@exchanges/binance
Version:
Exchange provider for Binance API
20 lines (19 loc) • 668 B
TypeScript
import { BinanceClient } from '../../../clients';
export interface PartialBookDepthStreamsResponse {
eventTime: Date;
transactionTime: Date;
symbol: string;
pair: string;
firstUpdateIdInEvent: number;
finalUpdateIdInEvent: number;
finalUpdateIdInLastStream: number;
bids: {
price: number;
quantity: number;
}[];
asks: {
price: number;
quantity: number;
}[];
}
export declare function partialBookDepthStreams(client: BinanceClient, symbol: string, level: 5 | 10 | 20, updateSpeed: '100ms' | '250ms' | '500ms', callback: (data: PartialBookDepthStreamsResponse, error?: any) => any): () => any;