Configuration Reference

The dccd daemon is driven by a YAML config file. The full annotated template is at examples/config.example.yml in the repository.

# Generate a starter config
cp examples/config.example.yml config.yml
dccd validate --config config.yml

Top-level structure

settings:
  data_path: /data/crypto
  log_level: INFO

storage:
  local_path: /data/crypto
  remotes: []           # optional rclone destinations

histo_jobs:
  - exchange: binance
    pairs: [BTC/USDT]
    span: 3600

stream_jobs:
  - exchange: binance
    pairs: [BTC/USDT]
    channels: [trades, book]
    time_step: 60

alerts:
  webhook_url: https://hooks.slack.com/...
  max_consecutive_errors: 5

settings block

Field

Default

Description

data_path

./data/crypto

Root directory where all data files are stored.

timezone

local

local, UTC, or an IANA name (e.g. Europe/Paris).

ui_host

127.0.0.1

Bind address for the web UI (dccd ui). Use 0.0.0.0 to expose it on the network.

ui_port

8080

TCP port for the web UI.

ui_auth_token

null

Bearer token required to access the web UI. null disables auth (appropriate only for a local 127.0.0.1 bind).


storage block

Field

Default

Description

local_path

(required)

Same as settings.data_path — root for Parquet files.

remotes

[]

List of rclone remote destinations (see below).

rclone remotes

storage:
  local_path: /data/crypto
  remotes:
    - name: s3-backup
      path: s3:my-bucket/crypto
      sync_interval: 3600   # seconds between rclone syncs

histo_jobs block

Each entry schedules periodic OHLCV REST downloads for one exchange and span.

Field

Default

Description

exchange

(required)

Exchange name: binance, kraken, bybit, okx, coinbase.

pairs

(required)

List of pairs, e.g. [BTC/USDT, ETH/USDT].

span

(required)

Candle interval in seconds: 60, 300, 900, 3600, 14400, 86400.

start

'2017-01-01'

Earliest date to backfill from.

max_retries

3

Number of retry attempts on transient network errors (1–10).

retry_delay

2.0

Base delay in seconds; actual delay is retry_delay × 2^(attempt-1).

Example with retry configuration:

histo_jobs:
  - exchange: okx
    pairs: [BTC/USDT, ETH/USDT, SOL/USDT]
    span: 3600
    start: '2022-01-01'
    max_retries: 5
    retry_delay: 3.0

stream_jobs block

Each entry opens a persistent WebSocket stream for one exchange.

Field

Default

Description

exchange

(required)

Exchange name: binance, kraken, bybit, okx, bitfinex, bitmex.

pairs

(required)

List of pairs.

channels

(required)

List of channels: trades, book. Kraken also supports ohlcv.

time_step

60

Snapshot interval in seconds — how often data is flushed to disk.

until

None

Total run duration in seconds. None means run indefinitely.

stream_jobs:
  - exchange: kraken
    pairs: [BTC/USD, ETH/USD]
    channels: [trades, book, ohlcv]
    time_step: 60

alerts block

Field

Default

Description

webhook_url

None

Slack (or any webhook) URL; a POST is sent when the error threshold is hit.

max_consecutive_errors

5

Number of consecutive job errors before an alert is fired.

Slack example:

alerts:
  webhook_url: https://hooks.slack.com/services/T.../B.../xxx
  max_consecutive_errors: 3

The webhook payload is a JSON object {"text": "dccd alert: <message>"}.


Complete example

settings:
  data_path: /data/crypto
  log_level: INFO

storage:
  local_path: /data/crypto
  remotes:
    - name: s3
      path: s3:my-bucket/crypto
      sync_interval: 3600

histo_jobs:
  - exchange: binance
    pairs: [BTC/USDT, ETH/USDT]
    span: 3600
    max_retries: 3
    retry_delay: 2.0

  - exchange: kraken
    pairs: [BTC/USD]
    span: 3600

stream_jobs:
  - exchange: binance
    pairs: [BTC/USDT]
    channels: [trades, book]
    time_step: 60

alerts:
  webhook_url: https://hooks.slack.com/services/T.../B.../xxx
  max_consecutive_errors: 5

Config models reference

dccd.daemon.config.CollectorConfig(*[, ...])

Root configuration model for the dccd daemon.

dccd.daemon.config.SettingsConfig(*[, ...])

Global local settings shared by the daemon and the backfill command.

dccd.daemon.config.StorageConfig(*[, ...])

Local and optional remote storage configuration.

dccd.daemon.config.RemoteConfig(*[, provider])

Remote storage configuration for rclone.

dccd.daemon.config.HistoJob(*, exchange, ...)

Historical (REST) data collection job.

dccd.daemon.config.StreamJob(*, exchange, ...)

Real-time (WebSocket) data collection job.

dccd.daemon.config.AlertConfig(*[, ...])

Optional alerting configuration.