run_backfillΒΆ

Defined in dccd.daemon.backfill

run_backfill(cfg, exchange=None, pairs=None, start='2020-01-01 00:00:00', parallel=False, dry_run=False, progress_callback=None, stop_event=None, message_callback=None)[source]

Run historical backfill for all matching jobs in cfg.

Parameters:
cfgCollectorConfig

Loaded daemon configuration.

exchangestr or None, optional

Filter to a single exchange. None runs all.

pairslist of str or None, optional

Filter to specific pairs in 'CRYPTO/FIAT' format. None runs all pairs defined in the config.

startstr, optional

Earliest date to backfill. Default is '2020-01-01 00:00:00'.

parallelbool, optional

Run all jobs in parallel threads.

dry_runbool, optional

Print estimates without making any API calls.

progress_callbackcallable, optional

Called as progress_callback(exchange, pair, windows_done, windows_total) after each window of each job. Used by the web UI; None (default) keeps CLI behaviour unchanged.

stop_eventthreading.Event, optional

When set, every job stops cleanly at its next window boundary. Used by the web UI to cancel a running backfill.

message_callbackcallable, optional

Called as message_callback(exchange, pair, line) for each log line of each job. Used by the web UI to surface backfill logs; None (default) keeps CLI behaviour unchanged.