@atomiqlabs/sdk
Version:
atomiq labs SDK for cross-chain swaps between smart chains and bitcoin
39 lines (38 loc) • 1.26 kB
TypeScript
import { CoinType, CtorCoinTypes } from "../abstract/IPriceProvider";
import { ExchangePriceProvider } from "./abstract/ExchangePriceProvider";
import { MultiChain } from "../../swapper/Swapper";
export type KrakenResponse = {
error: string[];
result: {
[ticker: string]: {
a: [string, string, string];
b: [string, string, string];
c: [string, string];
v: [string, string];
p: [string, string];
t: [number, number];
l: [string, string];
h: [string, string];
o: string;
};
};
};
/**
* Price provider using Kraken exchange API
* @category Pricing
*/
export declare class KrakenPriceProvider<T extends MultiChain> extends ExchangePriceProvider<T> {
constructor(coinsMap: CtorCoinTypes<T>, url?: string, httpRequestTimeout?: number);
/**
* @inheritDoc
*/
protected fetchPair(pair: string, abortSignal?: AbortSignal): Promise<number>;
/**
* @inheritDoc
*/
protected fetchUsdPrice(abortSignal?: AbortSignal): Promise<number>;
/**
* @inheritDoc
*/
protected fetchPrice(token: CoinType, abortSignal?: AbortSignal): Promise<bigint>;
}