OHLCBackfillΒΆ

Defined in dccd.daemon.backfill

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

Bases: _BackfillBase

Backfill strategy for exchanges with a paginated OHLC endpoint.

Parameters:
objImportDataCryptoCurrencies

Instantiated exchange object.

max_candlesint

Maximum candles per API request (exchange-specific).

sleepfloat

Seconds to wait between requests.

formstr

Output format (accepted for backward compatibility).

max_retriesint, optional

See _BackfillBase. Default 3.

retry_delayfloat, optional

See _BackfillBase. Default 2.0.

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).