Registry / data / databento

databento

JSON →
library0.79.0pypypiunverified

The official Python client library for Databento, providing fast, lightweight access to both live and historical market data from multiple venues and asset classes. It supports various schemas like MBO, MBP, OHLCV, and trades, and features an efficient Databento Binary Encoding (DBN) for data storage. The library is actively maintained with frequent releases, currently at version 0.75.0, offering consistent message schemas across live and historical data.

pip install -U databento
INSTALL
IMPORT
SIG · DATABENTO
D
databento
datapythonv0.79.0
Install
13.1s avg
Import
2220ms
Disk
364MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.79.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 2.309s · 373MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 13.1s · import 2.131s · 351MB
364MB installed
● package 364MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

databento
import databento as db
DBNRecord
from databento_dbn import DBNRecord
from databento.common.types import DBNRecord
As of v0.69.0, DBNRecord was moved from `databento.common.types` to `databento_dbn.DBNRecord`.

This quickstart initializes a Databento Historical client using an API key (preferably from an environment variable) and requests 100 trade records for E-mini S&P 500 futures for a specific hour on CME Globex, then converts the result to a pandas DataFrame and prints the head.

import databento as db import os api_key = os.environ.get('DATABENTO_API_KEY', 'YOUR_API_KEY') if api_key == 'YOUR_API_KEY': print("Warning: DATABENTO_API_KEY environment variable not set. Using placeholder.") client = db.Historical(api_key) try: data = client.timeseries.get_range( dataset="GLBX.MDP3", schema="trades", symbols=["ES.FUT"], stype_in="parent", start="2023-01-01T00:00", end="2023-01-01T01:00", limit=100 ) df = data.to_df() print(df.head()) except Exception as e: print(f"An error occurred: {e}")
Debug
Known issues
breaking`ts_out` field on record types is now permanent, and `__dict__` attribute has been removed from all Python record classes.
fix
Access `ts_out` directly as an attribute instead of `__dict__`. `ts_out` returns an `int` (`UNDEF_TIMESTAMP` when not set).
affects: >=0.75.0
gotchaA memory leak of approximately 64 bytes per record object was present in Python bindings due to a `pyo3` 0.28 regression.
fix
This was fixed in v0.74.1 by downgrading `pyo3` to 0.27.2. Users on affected versions should upgrade to >=0.74.1 or ensure their `pyo3` dependency is compatible.
affects: 0.74.0
breakingThe `DBNRecord` union type was moved from `databento.common.types` to `databento_dbn.DBNRecord`.
fix
Update import statements from `from databento.common.types import DBNRecord` to `from databento_dbn import DBNRecord`.
affects: >=0.69.0
breakingMultiple API and client library changes affected symbology types (stype) and field renaming. `product_id` was renamed to `instrument_id`. The `smart` stype was split into `parent` and `continuous`. The `native` stype was renamed to `raw_symbol`. The `product_id` stype was renamed to `instrument_id`.
fix
Update parameter names and stype values in API calls according to the new naming conventions. For example, use `instrument_id` instead of `product_id`.
affects: <0.69.0 (changes took effect April 28, 2023)
breakingThe Databento Binary Encoding (DBN) format changed from `dbz` to `dbn`, and the `timeseries.stream` endpoint was renamed to `timeseries.get_range`.
fix
Update encoding parameter to `dbn` and use `client.timeseries.get_range()` instead of `client.timeseries.stream()`.
affects: <0.69.0 (changes took effect March 3, 2023)
deprecatedThe `mode` parameter in `metadata.get_cost` has been deprecated and will be removed in a future release.
fix
Refactor code to avoid using the `mode` parameter in `metadata.get_cost`.
affects: >=0.65.0
breakingSupport for Python 3.9 was removed due to its end-of-life status.
fix
Upgrade your Python environment to Python 3.10 or newer.
affects: >=0.64.0
Upgrade
Version history
0.79.0latest on PyPI · released Jun 2, 2026
Audit
Dependencies
aiohttprequiredAsynchronous HTTP client functionality.
databento-dbnrequiredCore library for Databento Binary Encoding (DBN) handling.
numpyrequiredNumerical operations, often used in conjunction with pandas DataFrames.
pandasrequiredData manipulation and analysis, particularly for DataFrame conversion.
pip-system-certsoptionalManages system certificates, primarily for Windows environments.
pyarrowrequiredFacilitates Parquet file format support and efficient data handling.
requestsrequiredStandard HTTP client for interacting with the Databento API.
zstandardrequiredZstd compression/decompression for efficient data transfer.
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
databento — pip install databento · libregistry