OHLCBackfillΒΆ
Defined in dccd.daemon.backfill
- class OHLCBackfill(obj, max_candles, sleep, form, max_retries=3, retry_delay=2.0)[source]
Bases:
_BackfillBaseBackfill 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, progress_callback=None, stop_event=None, message_callback=None)
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).
- progress_callbackcallable, optional
Called as
progress_callback(windows_done, windows_total)after each window completes. Used by the web UI to report live progress;None(default) keeps CLI behaviour unchanged.- stop_eventthreading.Event, optional
When set, the backfill stops cleanly at the next window boundary. Used by the web UI to cancel a running backfill;
None(default) means the run cannot be interrupted.- message_callbackcallable, optional
Called with each human-readable log line as it is written. Used by the web UI to surface backfill logs;
None(default) keeps CLI behaviour unchanged.