API Reference¶
dccd v3 is a hexagonal architecture: a pure, synchronous domain with no I/O,
an async transport layer, exchange sources, storage, an
application layer of operations, and thin interfaces (CLI · HTTP API ·
UI · Python Client). See Architecture for the big picture.
Each object below links to its own page with the full signature, parameters and examples.
Client¶
The one-stop async facade — most users only need this.
|
Async context manager facade for dccd v3. |
Domain¶
Pure, synchronous value objects and helpers — no I/O. All timestamps are
nanoseconds UTC (int64).
|
Canonical trading pair (base/quote, spot by default). |
|
Core data types supported by dccd v3. |
|
One OHLCV candle bar. |
|
Single trade (tick). |
|
A complete (or delta) order book state at a point in time. |
|
One price level in an order book. |
|
Declares one atomic capability of a source adapter. |
|
Unique identifier for a dataset (exchange × symbol × type × span). |
|
Dataset-level lineage metadata (stored in Parquet metadata, not per-row). |
Pure transforms and time helpers:
|
Aggregate trades into OHLC bars of span seconds. |
Sources¶
One adapter per exchange, implementing the fine-grained Source protocols,
resolved through a registry. See Exchanges for capabilities and fidelity.
|
Maps exchange names to source adapter instances. |
|
Binance adapter for OHLC, trades and order book. |
|
Coinbase adapter. |
|
Kraken source adapter. |
|
Bybit adapter. |
|
OKX adapter — uses history-candles for deep OHLC, history-trades for deep trades. |
|
Bitfinex adapter — 10000 bars/trades per request (largest limit). |
|
BitMEX adapter — bucketed (1m/5m/1h/1d) OHLC, full trades history. |
Transport¶
Async I/O building blocks shared by every adapter.
|
Thin wrapper around httpx.AsyncClient with retry/backoff. |
|
Base async WebSocket client with exponential reconnect. |
|
Global per-exchange rate limiter. |
|
Paginate OHLC bars forward using declared Capability. |
|
Paginate trades by cursor, draining the |
Storage¶
Parquet datasets (ns timestamps, provenance, per-type dedup) and the run history.
|
Read/write interface for a single DatasetId. |
|
Append-only SQLite store for JobRun records. |
|
Migrate all Parquet files under data_path to the canonical v3 schema. |
Application¶
The operations and orchestration that wire domain, sources and storage together.
|
Backfill historical data from a source to the Parquet store. |
|
Stream live data continuously until stop_event is set. |
|
Read stored data for target in the given nanosecond range. |
|
Return a list of dataset descriptors for all stored data. |
|
Orchestrates JobSpecs (intervals → backfill; supervised → streams). |
|
|
|
YAML job definition — more human-friendly than JobSpec. |
|
Declarative job definition. |
|
Simple pub-sub event bus for operation progress/log/status events. |
Interfaces¶
|
Create and return the FastAPI application. |