HTTP API¶
dccd ui (UI only) and dccd start (full daemon) serve a JSON HTTP API
built with FastAPI. The Web UI is a pure client of this API, so anything
the UI does, you can script.
Base URL defaults to http://127.0.0.1:8080 (settings.ui_host /
ui_port). Interactive OpenAPI docs are available at /docs.
Authentication¶
If settings.ui_auth_token is set, every /api/* route requires a bearer
token (/health and the UI pages stay open):
curl -H "Authorization: Bearer $TOKEN" http://127.0.0.1:8080/api/inventory
Server-Sent Events cannot send headers, so /api/events also accepts the
token as a query parameter: /api/events?token=$TOKEN. CORS is same-origin by
default (configurable via settings.ui_allow_origins).
Endpoints¶
Inventory & data¶
Method |
Path |
Description |
|---|---|---|
|
|
All stored datasets (exchange, pair, type, span, rows, time range). |
|
|
Read stored rows for a dataset; body |
Backfill¶
Method |
Path |
Description |
|---|---|---|
|
|
Launch a backfill; body |
|
|
Poll a run: |
|
|
Cancel a running backfill (cooperative — stops at the next page, keeps collected rows). |
# start, then poll
RID=$(curl -s -XPOST localhost:8080/api/backfill \
-H 'Content-Type: application/json' \
-d '{"exchange":"binance","symbol":"BTC/USDT","data_type":"ohlc","span":3600,"start":"2024-01-01"}' \
| jq -r .run_id)
curl -s localhost:8080/api/backfill/$RID | jq '{state, rows_written, progress}'
Streams¶
Method |
Path |
Description |
|---|---|---|
|
|
Configured stream jobs and their running state. |
|
|
Start a stream; body |
|
|
Stop a stream; body |
Jobs¶
Method |
Path |
Description |
|---|---|---|
|
|
All configured job specs + state. |
|
|
Trigger one configured backfill job; body |
|
|
Trigger every enabled backfill job. |
Config, events & storage¶
Method |
Path |
Description |
|---|---|---|
|
|
Read / replace the configuration (validated; persisted to |
|
|
SSE stream of live |
|
|
Migrate legacy v2 Parquet files; body |
|
|
List registered operations. |
|
|
Liveness probe (always open). |
The application factory is create_app.