Reference.security_master.get_last
Make a streaming request for the latest security master data from Databento.
Each record represents a unique listing for a security.
The resulting data frame will be indexed and sorted by ts_effective.
See also
Security master dataset guide for further details.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
symbols | list or str | optional | The symbols to filter for. Takes up to 2,000 symbols per request. If more than 1 symbol is specified, the data is merged and sorted by time. If 'ALL_SYMBOLS' or None then will select all symbols by default. |
stype_in | SType or str, default 'raw_symbol' | optional | The symbology type of input symbols. Use any of 'raw_symbol', 'nasdaq_symbol', 'isin', 'us_code', 'bbg_comp_id', 'bbg_comp_ticker', 'figi', 'figi_ticker', 'listing_id', 'issuer_id', 'security_id'. |
countries | list or str | optional | The listing countries to filter for. Takes any number of country codes per request as two letter ISO 3166-1 alpha-2 strings. If not specified then will select all countries by default. See CNTRY enum. |
security_types | list or str | optional | The security types to filter for. If not specified then will select all security types by default. See SECTYPE enum. |
allocate_isins | bool, default True | optional | Whether the request should allocate any new ISINs for plans that are ISIN-limited. The request will drop any rows that would create new allocations. |
Returns
pandas.Dataframe
The data converted into a DataFrame.
See also
Security master field descriptions for further details.
API method
1 2 3 4 5 6 7
Reference.security_master.get_last(
symbols: Iterable[str] | str | None = None,
stype_in: SType | str = "raw_symbol",
countries: list[str] | str | None = None,
security_types: list[str] | str | None = None,
allocate_isins: bool = True,
) -> pd.DataFrame Example usage
1 2 3 4 5 6 7 8 9 10
import databento as db
client = db.Reference("$YOUR_API_KEY")
df_raw = client.security_master.get_last(
symbols=["AAPL"],
countries=["US"],
)
print(df_raw.head()) Example response
1 2 3
ts_record listing_id listing_group_id security_id issuer_id listing_status listing_source listing_created_date listing_date delisting_date issuer_name security_type security_description primary_exchange exchange operating_mic symbol nasdaq_symbol local_code isin us_code bbg_comp_id bbg_comp_ticker figi figi_ticker fisn lei sic cik gics naics cic cfi incorporation_country listing_country register_country trading_currency multi_currency segment_mic_name segment_mic structure lot_size par_value par_value_currency voting vote_per_sec shares_outstanding shares_outstanding_date ts_created ts_effective 2024-07-19 00:00:00+00:00 2024-08-05 02:41:52+00:00 L-135825 LG-35825 S-33449 I-30017 L M 2001-05-05 1980-12-12 None Apple Inc EQS Ordinary Shares USNASD USNASD XNAS AAPL AAPL AAPL US0378331005 37833100 BBG000B9XRY4 AAPL US BBG000B9Y5X2 AAPL UW NaN HWUPKR0MPOU8FGXBT394 3571 320193 NaN 334111 US31 ESVUFR US US US USD False Global Select XNGS NaN 100 0 USD V 1 15204137000 2024-07-19 2024-11-11 22:41:29.670132+00:00