Adapter scope: this page covers only the published
nautilus-databentocrate.
Databento Adapter
nautilus-databento integrates Databento DBN files, historical APIs, metadata, symbology, and live feeds with the Nautilus data system. It uses the official databento Rust SDK and decodes provider records directly into nautilus-model values.
No intermediate Anthera quote, trade, bar, or book model is required.
Crate modules
The native crate exposes modules for:
loader— DBN file and record loadinghistorical— historical API accesslive— live feed handlingdata— unified data-client behaviordecode— DBN-to-Nautilus conversionsymbology— provider symbol mappingfactories—LiveNodedata-client constructionarrow— optional Arrow encoding and schema integrationtypesandenums— adapter-specific configuration and protocol types
Source: crates/adapters/databento/src/lib.rs.
Canonical decode path
DBN market records are decoded into Nautilus Data variants:
- Order-book deltas
- Quotes
- Trades
- Bars
- Depth snapshots and delta batches where supported
Those values enter DataEngine, which updates cache and books, performs aggregation, publishes typed data, and dispatches actors or strategies. Storage and browser projections should consume these canonical values rather than repeat DBN normalization.
Source: crates/adapters/databento/src/decode/market_data.rs.
Historical and file loading
DatabentoDataLoader reads DBN data and emits Nautilus values. DatabentoHistoricalClient requests historical data from Databento. Symbology and instrument metadata must be resolved consistently with the requested dataset and schema.
Historical data should retain provider dataset, schema, publisher, raw symbol, symbology mode, and request interval as provenance metadata outside the core market payload.
Live data
The live feed handler manages Databento connectivity and converts incoming DBN records using the same model boundary as historical loading. DatabentoDataClientFactory constructs the client used by LiveNodeBuilder.
The native node example is:
cargo run --example databento-data-tester --package nautilus-databento
Source: crates/adapters/databento/examples/node_data_tester.rs.
Feature surface
The crate defaults to live and high-precision.
| Feature | Effect |
|---|---|
live |
Enables nautilus-live/node, nautilus-system, and environment loading |
high-precision |
Enables 128-bit Nautilus model precision |
arrow |
Enables Arrow and nautilus-serialization integration |
Precision must match every crate, persisted schema, and query path that exchanges these values.
Persistence boundary
The adapter fills the Nautilus data path; it does not automatically write QuestDB. Arrow support supplies schemas and conversion, while Feather or Parquet persistence must be wired explicitly. A QuestDB writer remains an owned adapter over canonical Nautilus values.
The authoritative writer seam must be bounded and observable. It must not block the engine callback thread, silently drop records, or rely on the lossy external message-bus egress.
Failure and recovery
A production integration must define:
- Reconnect and resubscribe behavior
- Provider sequence and gap detection
- Historical repair after an outage
- Duplicate and correction identity
- Commit watermarks before browser visibility
- Bounded behavior while durable storage is unavailable
The Databento adapter solves protocol access and normalization. Coverage, database commits, multi-user delivery, and browser resume semantics remain service concerns.
Verification
Use committed DBN fixtures to compare loader, historical, and live decode results. At minimum, verify exact price and quantity precision, nanosecond timestamps, record ordering, symbology, duplicate retries, and high-precision Arrow or database round trips.