KrakenBackfill

Defined in dccd.daemon.backfill

class KrakenBackfill(obj, sleep, form, max_retries=3, retry_delay=2.0)[source]

Bases: _BackfillBase

Backfill strategy for Kraken using the /Trades endpoint.

Kraken’s OHLC endpoint only returns the last ~720 candles regardless of since. This strategy paginates /Trades with nanosecond cursors, then resamples the raw trades into OHLC candles.

Parameters:
objImportDataCryptoCurrencies

Instantiated FromKraken object.

sleepfloat

Seconds to wait between paginated API calls.

formstr

Output format (accepted for backward compatibility).

run(start_str, dry_run=False, position=0)

Run the full backfill for this (exchange, pair).

Parameters:
start_strstr

Earliest date to backfill ('YYYY-MM-DD HH:MM:SS'). Interpreted in the timezone stored on the exchange object.

dry_runbool, optional

Print an estimate without making any API calls.

positionint, optional

tqdm bar position (use distinct values for parallel runs).