Available languages: [Python](https://databento.com/docs/api-reference-data/helpers/security-master-get-range-params.python.md) · [Rust](https://databento.com/docs/api-reference-data/helpers/security-master-get-range-params.rust.md) · [HTTP](https://databento.com/docs/api-reference-data/helpers/security-master-get-range-params.http.md)

Source: https://databento.com/docs/api-reference-data/helpers/security-master-get-range-params


### GetRangeParams

The parameter struct and builder for [ReferenceClient::corporate_actions::get_range](https://databento.com/docs/api-reference-data/corporate-actions/corporate-actions-get-range.md).

The builder can be instantiated with the associated function `builder()`, and the struct is created from the builder with the `build()` method.
For every field, there is an identically named setter method on the builder.

#### API method

```rust
pub struct GetRangeParams {
    pub start: OffsetDateTime,
    pub end: Option<OffsetDateTime>,
    pub index: Index,
    pub symbols: Symbols,
    pub stype_in: SType,
    pub events: Vec<Event>,
    pub countries: Vec<Country>,
    pub security_types: Vec<SecurityType>,
    pub allocate_isins: bool,
}
```

#### Fields

| Parameter | Type | Description |
| `start` | OffsetDateTime | The inclusive start of the request range based on `index`. |
| `end` | Option\ | The exclusive end of the request range based on `index`. If `None`, then will return **all** data available after `start`. |
| `index` | Index | The index column to use for filtering the `start` and `end` time range and for record ordering. Use any of `EventDate`, `ExDate` or `TsRecord`. Records with a `NULL` value in the specified `index` column will be excluded. |
| `symbols` | Symbols | 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 | The [symbology type](https://databento.com/docs/api-reference-data/basics/symbology.md) of input `symbols`. |
| `events` | Vec\ | The event types to filter for. Takes any number of [event](https://databento.com/docs/conventions/corporate-actions-events.md)s per request. If not specified then will select **all** event types by default. See [EVENT](https://databento.com/docs/conventions/reference-data-enums.md#event) enum. |
| `countries` | Vec\ | 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` | Vec\ | 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 | Whether the request should allocate any new ISINs for plans that are ISIN-limited. If `false`, the request will drop any rows that would create new allocations. Defaults to `true`. |

#### Example usage

```rust
use databento::{
    ReferenceClient,
    dbn::SType,
    reference::{
        Country,
        security::{GetRangeParams, Index},
    },
};
use time::macros::{date, datetime};

assert_eq!(
    GetRangeParams::builder()
        .symbols("AAPL")
        .countries([Country::Us])
        .start(date!(2005 - 01 - 01))
        .build(),
    GetRangeParams {
        start: datetime!(2005-01-01 00:00 UTC),
        end: None,
        index: Index::default(),
        symbols: "AAPL".into(),
        stype_in: SType::RawSymbol,
        countries: vec![Country::Us],
        security_types: vec![],
        allocate_isins: true
    }
);
```
