OKXSource¶
Defined in dccd.sources.okx
- class OKXSource(http=None)[source]
Bases:
OHLCHistory,TradesHistory,OrderBookSnapshotREST,OHLCLive,TradesLive,OrderBookLiveOKX adapter — uses history-candles for deep OHLC, history-trades for deep trades.
- async fetch_trades_page(symbol, start_ns, end_ns, limit, cursor=None)[source]
Fetch one page of trades (cursor = OKX
afterts in ms).OKX
history-trades(type=2) returns records earlier than theaftertimestamp, newest first. We page backward fromend_nsuntil the oldest item drops belowstart_nsor a short page arrives.