DBNStore.request_full_definitions
Request for full instrument Definition(s) for all symbols based on the metadata properties. This is useful for retrieving the instrument definitions for saved DBN data.
A timeseries.get_range request is made to obtain the definitions data which will incur a cost.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
client | Historical | required | The historical client to use for the request (contains the API key). |
path | PathLike[str] or str | optional | The path to stream the data to on disk (will then return a DBNStore). |
Returns
A DBNStore object.
A full list of fields for each schema is available through Historical.metadata.list_fields.
API method
1 2 3 4
DBNStore.request_full_definitions(
client: Historical,
path: PathLike[str] | str | None = None,
) -> DBNStore Example usage
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
import databento as db
client = db.Historical(
key="$YOUR_API_KEY",
)
trades = client.timeseries.get_range(
dataset="GLBX.MDP3",
symbols=["ES.FUT"],
stype_in="parent",
schema="trades",
start="2022-06-06",
)
definitions = trades.request_full_definitions(client).to_df()
definitions = definitions.sort_values(["expiration", "symbol"]).set_index("expiration")
print(definitions[["symbol"]]) Example response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
symbol expiration 2022-06-17 13:30:00+00:00 ESM2 2022-06-17 13:30:00+00:00 ESM2-ESH3 2022-06-17 13:30:00+00:00 ESM2-ESM3 2022-06-17 13:30:00+00:00 ESM2-ESU2 2022-06-17 13:30:00+00:00 ESM2-ESZ2 2022-09-16 13:30:00+00:00 ESU2 2022-09-16 13:30:00+00:00 ESU2-ESH3 2022-09-16 13:30:00+00:00 ESU2-ESM3 2022-09-16 13:30:00+00:00 ESU2-ESU3 2022-09-16 13:30:00+00:00 ESU2-ESZ2 2022-12-16 14:30:00+00:00 ESZ2 2022-12-16 14:30:00+00:00 ESZ2-ESH3 2022-12-16 14:30:00+00:00 ESZ2-ESM3 2022-12-16 14:30:00+00:00 ESZ2-ESU3 2023-03-17 13:30:00+00:00 ESH3 2023-03-17 13:30:00+00:00 ESH3-ESM3 2023-03-17 13:30:00+00:00 ESH3-ESU3 2023-03-17 13:30:00+00:00 ESH3-ESZ3 2023-06-16 13:30:00+00:00 ESM3 2023-06-16 13:30:00+00:00 ESM3-ESU3 2023-06-16 13:30:00+00:00 ESM3-ESZ3 2023-09-15 13:30:00+00:00 ESU3 2023-09-15 13:30:00+00:00 ESU3-ESH4 2023-09-15 13:30:00+00:00 ESU3-ESZ3 2023-12-15 14:30:00+00:00 ESZ3 2023-12-15 14:30:00+00:00 ESZ3-ESH4 2024-03-15 13:30:00+00:00 ESH4 2024-03-15 13:30:00+00:00 ESH4-ESM4 2024-06-21 13:30:00+00:00 ESM4 2024-09-20 13:30:00+00:00 ESU4 2024-12-20 14:30:00+00:00 ESZ4 2025-12-19 14:30:00+00:00 ESZ5 2026-12-18 14:30:00+00:00 ESZ6