crypto-crawler
Version:
Crawl orderbook and trade messages from crypto exchanges.
18 lines (17 loc) • 810 B
TypeScript
import { MarketType } from 'crypto-markets';
import { MsgCallback } from './crawler';
import { ChannelType } from './pojo/channel_type';
/**
* Crawl messages from a crypto exchange.
*
* @param exchange The crypto exchange name
* @param marketType Market type, e.g., Spot, Futures
* @param channelTypes Channel types to crawl, e.g., Trade, BBO, OrderBook
* @param pairs Trading pairs, e.g., BTC_USDT
* @param msgCallback The callback function to process messages
* @returns void
*/
export default function crawl(exchange: string, marketType: MarketType, channelTypes: readonly ChannelType[], pairs: readonly string[], msgCallback?: MsgCallback): Promise<void>;
export { MsgCallback, SUPPORTED_EXCHANGES } from './crawler';
export { ChannelType } from './pojo/channel_type';
export * from './pojo/msg';