Security master
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.
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.
Security master field descriptions for further details.
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 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()) 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
Reference.security_master.get_range
Make a streaming request for security master point-in-time (PIT) time series data from Databento.
Each record represents the status of a unique listing for a security with an effective date.
The specified index will be used to filter the time range and order the records. It will also be set as the index of the resulting data frame.
Security master dataset guide for further details.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
start | pd.Timestamp, datetime, date, str, or int | required | The inclusive start of the request range. Takes pd.Timestamp, Python datetime, Python date, ISO 8601 string, or UNIX timestamp in nanoseconds. Assumes UTC as timezone unless otherwise specified. |
end | pd.Timestamp, datetime, date, str, or int | optional | The exclusive end of the request range. Takes pd.Timestamp, Python datetime, Python date, ISO 8601 string, or UNIX timestamp in nanoseconds. Assumes UTC as timezone unless otherwise specified. If None, then will return all data available after start. |
index | str, default 'ts_effective' | optional | The index column to use for filtering the start and end time range and record ordering. Use any of 'ts_effective' or 'ts_record'. |
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
pd.Dataframe
The data converted into a DataFrame.
Security master field descriptions for further details.
1 2 3 4 5 6 7 8 9 10
Reference.security_master.get_range(
start: pd.Timestamp | datetime | date | str | int,
end: pd.Timestamp | datetime | date | str | int | None = None,
index: str = "ts_effective",
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 1 2 3 4 5 6 7 8 9 10 11
import databento as db
client = db.Reference("$YOUR_API_KEY")
df_raw = client.security_master.get_range(
symbols=["AAPL"],
countries=["US"],
start="2005-01-01",
)
print(df_raw.head(10)) 1 2 3 4 5 6 7 8 9 10 11 12
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 2004-11-19 00:00:00+00:00 2004-12-06 15:09:30+00:00 L-135825 LG-35825 S-33449 I-30017 L M 2001-05-05 1980-12-12 None Apple Computer 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 402057856 2004-11-19 2024-11-11 22:41:24.780487+00:00 2005-01-25 00:00:00+00:00 2005-02-03 16:00:32+00:00 L-135825 LG-35825 S-33449 I-30017 L M 2001-05-05 1980-12-12 None Apple Computer 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 408585970 2005-01-25 2024-11-11 22:41:24.780487+00:00 2005-02-28 00:00:00+00:00 2005-03-01 15:28:04+00:00 L-135825 LG-35825 S-33449 I-30017 L M 2001-05-05 1980-12-12 None Apple Computer 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 817171940 2005-02-28 2024-11-11 22:41:24.780487+00:00 2005-04-22 00:00:00+00:00 2005-05-06 14:06:41+00:00 L-135825 LG-35825 S-33449 I-30017 L M 2001-05-05 1980-12-12 None Apple Computer 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 823933916 2005-04-22 2024-11-11 22:41:24.780487+00:00 2005-07-22 00:00:00+00:00 2005-08-04 14:39:03+00:00 L-135825 LG-35825 S-33449 I-30017 L M 2001-05-05 1980-12-12 None Apple Computer 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 829829296 2005-07-22 2024-11-11 22:41:24.780487+00:00 2005-11-18 00:00:00+00:00 2005-12-02 15:25:18+00:00 L-135825 LG-35825 S-33449 I-30017 L M 2001-05-05 1980-12-12 None Apple Computer 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 842767948 2005-11-18 2024-11-11 22:41:24.780487+00:00 2006-01-25 00:00:00+00:00 2006-02-07 15:32:26+00:00 L-135825 LG-35825 S-33449 I-30017 L M 2001-05-05 1980-12-12 None Apple Computer 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 848612359 2006-01-25 2024-11-11 22:41:24.780487+00:00 2006-04-26 00:00:00+00:00 2006-05-09 14:36:54+00:00 L-135825 LG-35825 S-33449 I-30017 L M 2001-05-05 1980-12-12 None Apple Computer 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 850508144 2006-04-26 2024-11-11 22:41:24.780487+00:00 2006-12-13 00:00:00+00:00 2007-01-02 15:42:39+00:00 L-135825 LG-35825 S-33449 I-30017 L M 2001-05-05 1980-12-12 None Apple Computer 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 859273757 2006-12-13 2024-11-11 22:41:24.780487+00:00 2007-01-11 00:00:00+00:00 2007-01-11 00:00:00+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 859273757 2006-12-13 2024-11-11 22:41:29.670132+00:00