DBNStore.insert_symbology_json

Insert JSON symbology data which may be obtained from a symbology request or loaded from a file.

Parameters

Parameter
Type
Required
Description
json_data
str or Mapping[str, Any] or TextIO
required
The JSON data to insert.
clear_existing
bool
optional
If existing symbology data should be cleared from the internal mappings.
API method
1
2
3
4
DBNStore.insert_symbology_json(
    json_data: str | Mapping[str, Any] | TextIO,
    clear_existing: bool = True,
) -> None
Example usage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import databento as db

client = db.Historical("$YOUR_API_KEY")

data = client.timeseries.get_range(
    dataset="XNAS.ITCH",
    symbols=["ALL_SYMBOLS"],
    schema="trades",
    start="2022-06-06",
    end="2022-06-07",
)

# Request symbology for all symbols and then insert this data
symbology_json = data.request_symbology(client)
data.insert_symbology_json(symbology_json, clear_existing=True)