BinanceSourceΒΆ
Defined in dccd.sources.binance
- class BinanceSource(http=None)[source]
Bases:
OHLCHistory,TradesHistory,OrderBookSnapshotREST,OHLCLive,TradesLive,OrderBookLiveBinance adapter for OHLC, trades and order book.
Supports: REST historical (klines 1000/req, aggTrades 1000/req, depth 5000), WebSocket live (kline, aggTrade, depth).
- async fetch_trades_page(symbol, start_ns, end_ns, limit, cursor=None)[source]
Fetch one page of aggregate trades (cursor =
fromId).First call (
cursor=None) is time-bounded onstart_ns; subsequent calls follow thefromIdcursor. The next cursor is the last aggregate-trade id + 1, returned only while the page is full and the last trade is still inside the window.
- render_symbol(s)[source]
Binance format: BTCUSDT (no separator).