tardis-dev
Version:
Convenient access to tick-level historical and real-time cryptocurrency market data via Node.js
48 lines • 1.53 kB
TypeScript
import { BookChange, Trade } from '../types.ts';
import { Mapper } from './mapper.ts';
export declare const bitnomialTradesMapper: Mapper<'bitnomial', Trade>;
export declare class BitnomialBookChangMapper implements Mapper<'bitnomial', BookChange> {
canHandle(message: BitnomialBookMessage): message is {
ack_id: "7187577067767395971";
price: 18970;
quantity: 5;
side: "Ask" | "Bid";
symbol: "BUIH23";
timestamp: "2023-01-12T20:03:28.292532617Z";
type: "level";
} | {
ack_id: "7187577067767395784";
asks: BookLevel[];
bids: BookLevel[];
symbol: "BUSH23";
timestamp: "2023-01-12T20:03:06.479197763Z";
type: "book";
};
getFilters(symbols?: string[]): ({
readonly channel: "book";
readonly symbols: string[] | undefined;
} | {
readonly channel: "level";
readonly symbols: string[] | undefined;
})[];
map(message: BitnomialBookMessage, localTimestamp: Date): IterableIterator<BookChange>;
}
type BookLevel = [number, number];
type BitnomialBookMessage = {
ack_id: '7187577067767395971';
price: 18970;
quantity: 5;
side: 'Ask' | 'Bid';
symbol: 'BUIH23';
timestamp: '2023-01-12T20:03:28.292532617Z';
type: 'level';
} | {
ack_id: '7187577067767395784';
asks: BookLevel[];
bids: BookLevel[];
symbol: 'BUSH23';
timestamp: '2023-01-12T20:03:06.479197763Z';
type: 'book';
};
export {};
//# sourceMappingURL=bitnomial.d.ts.map