UNPKG

tardis-dev

Version:

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

126 lines 3.88 kB
import { BookChange, BookTicker, DerivativeTicker, Exchange, Trade } from '../types'; import { Mapper } from './mapper'; export declare class BitgetTradesMapper implements Mapper<'bitget' | 'bitget-futures', Trade> { private readonly _exchange; constructor(_exchange: Exchange); canHandle(message: BitgetTradeMessage): boolean; getFilters(symbols?: string[]): { readonly channel: "trade"; readonly symbols: string[] | undefined; }[]; map(message: BitgetTradeMessage, localTimestamp: Date): IterableIterator<Trade>; } export declare class BitgetBookChangeMapper implements Mapper<'bitget' | 'bitget-futures', BookChange> { private readonly _exchange; constructor(_exchange: Exchange); canHandle(message: BitgetOrderbookMessage): boolean; getFilters(symbols?: string[]): { readonly channel: "books15"; readonly symbols: string[] | undefined; }[]; map(message: BitgetOrderbookMessage, localTimestamp: Date): IterableIterator<BookChange>; } export declare class BitgetBookTickerMapper implements Mapper<'bitget' | 'bitget-futures', BookTicker> { private readonly _exchange; constructor(_exchange: Exchange); canHandle(message: BitgetBBoMessage): boolean; getFilters(symbols?: string[]): { channel: "books1"; symbols: string[] | undefined; }[]; map(message: BitgetBBoMessage, localTimestamp: Date): IterableIterator<BookTicker>; } export declare class BitgetDerivativeTickerMapper implements Mapper<'bitget-futures', DerivativeTicker> { private readonly pendingTickerInfoHelper; canHandle(message: BitgetTickerMessage): boolean; getFilters(symbols?: string[]): { readonly channel: "ticker"; readonly symbols: string[] | undefined; }[]; map(message: BitgetTickerMessage, localTimestamp: Date): IterableIterator<DerivativeTicker>; } type BitgetTradeMessage = { action: 'update'; arg: { instType: 'SPOT'; channel: 'trade'; instId: 'OPUSDT'; }; data: [{ ts: '1730332800983'; price: '1.717'; size: '56.16'; side: 'buy'; tradeId: '1235670816495050754'; }]; ts: 1730332800989; }; type BitgetOrderbookMessage = { action: 'snapshot'; arg: { instType: 'SPOT'; channel: 'books15'; instId: 'GEMSUSDT'; }; data: [ { asks: [['0.22816', '155.25']]; bids: [['0.22785', '73.41']]; checksum: 0; ts: '1730963759993'; } ]; ts: 1730963759997; }; type BitgetBBoMessage = { action: 'snapshot'; arg: { instType: 'SPOT'; channel: 'books1'; instId: 'METISUSDT'; }; data: [{ asks: [['44.90', '0.6927']]; bids: [['44.82', '3.5344']]; checksum: 0; ts: '1730332859988'; }]; ts: 1730332859989; }; type BitgetTickerMessage = { action: 'snapshot'; arg: { instType: 'COIN-FUTURES'; channel: 'ticker'; instId: 'BTCUSD'; }; data: [ { instId: 'BTCUSD'; lastPr: '72331.5'; bidPr: '72331.5'; askPr: '72331.8'; bidSz: '7.296'; askSz: '0.02'; open24h: '72047.8'; high24h: '72934.8'; low24h: '71422.8'; change24h: '-0.00561'; fundingRate: '0.000116'; nextFundingTime: string; markPrice: string; indexPrice: string; holdingAmount: string; baseVolume: '7543.376'; quoteVolume: '544799876.924'; openUtc: '72335.3'; symbolType: '1'; symbol: 'BTCUSD'; deliveryPrice: '0'; ts: '1730332823217'; } ]; ts: 1730332823220; }; export {}; //# sourceMappingURL=bitget.d.ts.map