Environment:Nautechsystems Nautilus trader Databento API Credentials
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Data_Providers |
| Last Updated | 2026-02-10 08:30 GMT |
Overview
Databento market data API credentials environment providing API key authentication for historical data loading and live streaming.
Description
The Databento adapter provides access to historical and live market data from the Databento platform. The API key is sourced from the `DATABENTO_API_KEY` environment variable when not explicitly passed in the configuration. Databento provides normalized market data in DBN format which the `DatabentoDataLoader` converts into NautilusTrader data types (trade ticks, quote ticks, bars, OHLCV, etc.).
Usage
This environment is required when using the Databento adapter for data loading or live data streaming. It is specifically needed by the `DatabentoDataLoader.from_dbn_file()` method for historical data conversion and by the Databento live client configuration.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| Network | Internet access to Databento API | For live streaming and historical data downloads |
| Account | Databento account with API key | Free tier available for limited historical data |
Dependencies
Python Packages
- `databento` (Databento Python client, installed separately)
Credentials
- `DATABENTO_API_KEY`: Databento API secret key. Sourced automatically from environment if not passed to config.
Quick Install
# Install Databento client
pip install databento
# Set API key
export DATABENTO_API_KEY="your-databento-api-key"
Code Evidence
API key sourcing from `adapters/databento/config.py:26-28`:
api_key : str, optional
The Databento API secret key.
If ``None`` then will source the `DATABENTO_API_KEY` environment variable.
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `RuntimeError: Environment variable 'DATABENTO_API_KEY' not set` | API key not in environment | Set `export DATABENTO_API_KEY=...` or pass key directly to config |
| `ImportError` for databento module | databento package not installed | `pip install databento` |
Compatibility Notes
- DBN format: Databento uses its proprietary DBN binary format. The `DatabentoDataLoader` handles conversion to NautilusTrader types.
- Timeout: The `timeout_initial_load` parameter defaults to 15.0 seconds for initial instrument loading.