UNPKG

@hackape/tardis-dev

Version:

Convenient access to tick-level historical and real-time cryptocurrency market data via Node.js

41 lines 1.21 kB
import { Exchange } from '../types'; import { ExchangeDetailsBase } from './exchangedetails'; declare type AvailableSymbol = ExchangeDetailsBase<any>['availableSymbols'][number]; export declare function getMarketInfo(exchange: Exchange): Promise<MarketInfoDatabase | undefined>; declare class MarketInfoDatabase { db: Map<string, MarketInfoRecord>; assetInfo: Map<string, { base: string; quote: string; }>; count: number; add(record: MarketInfoRecord): void; mixin(exchange: Exchange, symbol: AvailableSymbol): { id: string; type: import("./exchangedetails").SymbolType; availableSince: string; availableTo?: string | undefined; name?: string | undefined; market?: MarketInfo | undefined; }; } declare type ContractInfo = { isInverse: boolean; multiplier: number; unit: string; }; export interface MarketInfo { base: string; quote: string; precision: { price: number; amount: number; }; contract?: ContractInfo; } interface MarketInfoRecord extends MarketInfo { id: string; type: 'spot' | 'perpetual' | 'future'; } export {}; //# sourceMappingURL=marketinfo.d.ts.map