Historical.metadata.get_dataset_condition

Get the dataset condition from Databento.

Use this method to discover data availability and quality.

Parameters

Parameter
Type
Required
Description
dataset
Dataset or str
required
The dataset code (string identifier). Must be one of the values from list_datasets.
start_date
date or str
optional
The inclusive UTC start date of the request range as a Python date or ISO 8601 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 or ISO 8601 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
API method
1
2
3
4
5
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]]
Example usage
1
2
3
4
5
6
7
8
9
10
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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[
    {
        "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"
    }
]