OKXSource

Defined in dccd.sources.okx

class OKXSource(http=None)[source]

Bases: OHLCHistory, TradesHistory, OrderBookSnapshotREST, OHLCLive, TradesLive, OrderBookLive

OKX 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 after ts in ms).

OKX history-trades (type=2) returns records earlier than the after timestamp, newest first. We page backward from end_ns until the oldest item drops below start_ns or a short page arrives.