Source: https://databento.com/docs/api-reference-data/security-master/security-master-get-last


### Reference.security\_master.get\_last

Make a streaming request for the latest security master data from Databento.

Each record represents a unique [listing](https://databento.com/docs/faqs/instruments-and-products.md#listings) for a security.

The resulting data frame will be indexed and sorted by `ts_effective`.

> **See also**
>
> [Security master](https://databento.com/docs/datasets/security-master.md) dataset guide for further details.

#### API method

```python
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
```

#### 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](https://databento.com/docs/api-reference-data/basics/symbology.md) 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](https://databento.com/docs/conventions/reference-data-enums.md#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](https://databento.com/docs/conventions/reference-data-enums.md#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](https://databento.com/docs/schemas/security-master.md#fields) for further details.

#### Example usage

```python
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

```plaintext
                                          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
```
