Source: https://databento.com/docs/api-reference-data/adjustment-factors


## Adjustment factors


### Reference.adjustment\_factors.get\_range

Make a streaming request for adjustment factors time series data from Databento.

Each record represents a unique corporate actions event with an adjustment factor at the [listing](https://databento.com/docs/faqs/instruments-and-products.md#listings) level.

The `ex_date` column 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.

> **See also**
>
> [Adjustment factors](https://databento.com/docs/datasets/adjustment-factors.md) dataset guide for further details.

#### API method

```python
Reference.adjustment_factors.get_range(
    start: pd.Timestamp | datetime | date | str | int,
    end: pd.Timestamp | datetime | date | str | int | None = None,
    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 |
| `start` | pd.Timestamp, datetime, date, str, or int | required | The inclusive start of the request range based on `ex_date`. Takes [pd.Timestamp](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Timestamp.html), [Python datetime](https://docs.python.org/3/library/datetime.html#datetime-objects), [Python date](https://docs.python.org/3/library/datetime.html#date-objects), [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) string, or [UNIX timestamp](https://en.wikipedia.org/wiki/Unix_time) 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 based on `ex_date`. Takes [pd.Timestamp](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Timestamp.html), [Python datetime](https://docs.python.org/3/library/datetime.html#datetime-objects), [Python date](https://docs.python.org/3/library/datetime.html#date-objects), [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) string, or [UNIX timestamp](https://en.wikipedia.org/wiki/Unix_time) in nanoseconds. Assumes UTC as timezone unless otherwise specified. If `None`, then will return **all** data available after `start`. |
| `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', '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

`pd.Dataframe`

The data converted into a DataFrame.

> **See also**
>
> Adjustment factors [field descriptions](https://databento.com/docs/schemas/adjustment-factors.md#fields) for further details.

#### Example usage

```python
import databento as db

client = db.Reference("$YOUR_API_KEY")

df_raw = client.adjustment_factors.get_range(
    symbols=["MSFT"],
    stype_in="raw_symbol",
    start="2019",
    end="2020",
    countries=["US"],
)

print(df_raw.head())
```
#### Example response

```plaintext
           security_id       event_id event            issuer_name security_type  ... dividend_currency frequency option                              detail                       ts_created
ex_date                                                                           ...
2019-02-20     S-39827  E-1443840-DIV   DIV  Microsoft Corporation           EQS  ...               USD       INT      1  INT Dividend (cash) of USD0.46/EQS 2024-09-23 00:25:46.589794+00:00
2019-05-15     S-39827  E-1550148-DIV   DIV  Microsoft Corporation           EQS  ...               USD       FNL      1  FNL Dividend (cash) of USD0.46/EQS 2024-09-23 00:28:54.651339+00:00
2019-08-14     S-39827  E-1617896-DIV   DIV  Microsoft Corporation           EQS  ...               USD       INT      1  INT Dividend (cash) of USD0.46/EQS 2024-09-23 00:32:47.230682+00:00
2019-11-20     S-39827  E-1669990-DIV   DIV  Microsoft Corporation           EQS  ...               USD       INT      1  INT Dividend (cash) of USD0.51/EQS 2024-09-23 00:36:33.357489+00:00

[4 rows x 27 columns]
```
