KrakenSourceΒΆ
Defined in dccd.sources.kraken
- class KrakenSource(http=None)[source]
Bases:
OHLCHistory,TradesHistory,OrderBookSnapshotREST,OHLCLive,TradesLive,OrderBookLiveKraken source adapter.
OHLC REST: most recent 720 bars only (
history="recent"). Full OHLC history requires derivation from Trades (deferred, M3). Trades REST: full history viasincecursor.- async fetch_ohlc_page(symbol, span, start_ns, end_ns, limit)[source]
Fetch up to limit OHLC bars from start_ns.
Warning
Kraken only returns the 720 most recent bars. Requests for deep history silently return recent data. Use the
history="recent"capability to inform the resolver.
- async fetch_trades_page(symbol, start_ns, end_ns, limit, cursor=None)[source]
Fetch one page of trades (cursor = Kraken
sincens).Kraken returns up to 1 000 trades from the
sincecursor and aresult["last"]nanosecond cursor for the next page. We follow it until the page is short (caught up to the present) or the cursor stops advancing.