UNPKG

@melonproject/ea-bitfinex

Version:
23 lines (22 loc) 943 B
import * as Rx from 'rxjs'; import BigNumber from 'bignumber.js'; export interface SubscriptionOptions { symbol: string; prec?: 'P0' | 'P1' | 'P2' | 'P3' | 'P4'; freq?: 'F0' | 'F1'; length?: 25 | 100; } export declare type SubscriptionOptionsWithoutSymbol = Pick<SubscriptionOptions, Exclude<keyof SubscriptionOptions, 'symbol'>>; export interface TradingPairBookEntry { price: BigNumber; count: BigNumber; amount: BigNumber; } export declare const watchAssetPair: (pair: string, options?: Pick<SubscriptionOptions, "prec" | "freq" | "length">) => Rx.Observable<TradingPairBookEntry | TradingPairBookEntry[]>; export interface CurrencyBookEntry { rate: BigNumber; period: BigNumber; count: BigNumber; amount: BigNumber; } export declare const watchCurrency: (symbol: string, options?: Pick<SubscriptionOptions, "prec" | "freq" | "length">) => Rx.Observable<CurrencyBookEntry | CurrencyBookEntry[]>;