Source: https://databento.com/docs/api-historical/metadata/metadata-get-dataset-condition



### Historical.metadata.get\_dataset\_condition

Get the [dataset](https://databento.com/docs/api-historical/basics/datasets.md) condition from Databento.

Use this method to discover data availability and quality.

#### API method

```python
Historical.metadata.get_dataset_condition(
    dataset: Dataset | str,
    start_date: date | str | None = None,
    end_date: date | str | None = None,
) -> list[dict[str, str | None]]
```

#### Parameters

| Parameter | Type | Required | Description |
| `dataset` | Dataset or str | required | The [dataset](https://databento.com/docs/api-historical/basics/datasets.md) code (string identifier). Must be one of the values from [list\_datasets](https://databento.com/docs/api-historical/metadata/metadata-list-datasets.md). |
| `start_date` | date or str | optional | The inclusive UTC start date of the request range as a [Python date](https://docs.python.org/3/library/datetime.html#date-objects) or [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) date string. If `None` then first date available. |
| `end_date` | date or str | optional | The inclusive UTC end date of the request range as a [Python date](https://docs.python.org/3/library/datetime.html#date-objects) or [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) date string. If `None` then last date available. |

#### Returns

`list[dict[str, str | None]]`

A list of conditions per date.

| Field | Type | Description |
| `date` | str | The day of the described data, as an ISO 8601 date string. |
| `condition` | str | The condition code describing the quality and availability of the data on the given day. Possible values are listed below. |
| `last_modified_date` | str or None | The date when any schema in the dataset on the given day was last generated or modified, as an ISO 8601 date string. Will be `None` when `condition` is 'missing'. |

Possible values for condition:
- `available`: the data is available with no known issues
- `degraded`:  the data is available, but there may be missing data or other correctness issues
- `pending`:  the data is not yet available, but may be available soon
- `missing`: the data is not available

#### Example usage

```python
import databento as db

client = db.Historical("$YOUR_API_KEY")

conditions = client.metadata.get_dataset_condition(
    dataset="GLBX.MDP3",
    start_date="2022-06-06",
    end_date="2022-06-10",
)
print(conditions)
```
#### Example response

```json
[
    {
        "date": "2022-06-06",
        "condition": "available",
        "last_modified_date": "2024-05-18"
    },
    {
        "date": "2022-06-07",
        "condition": "available",
        "last_modified_date": "2024-05-21"
    },
    {
        "date": "2022-06-08",
        "condition": "available",
        "last_modified_date": "2024-05-21"
    },
    {
        "date": "2022-06-09",
        "condition": "available",
        "last_modified_date": "2024-05-21"
    },
    {
        "date": "2022-06-10",
        "condition": "available",
        "last_modified_date": "2024-05-22"
    }
]
```
