Warnings
Our historical API uses the X-Warning response header to attach non-fatal
warnings to a successful request. A warning means that your request was
processed, but some aspect of the request or its result deserves attention.
For example, one or more symbols may not have resolved, or the request may
rely on behavior that is scheduled for removal.
A warning does not change the HTTP status code of the response. The header is
only sent with 2xx responses, and is omitted entirely when there are no
warnings. Failed requests are reported as
errors instead.
Format
The value of the X-Warning header is a JSON array of strings. Each string is
a single warning in the form <category>: <message>, where <category> is one
of the following:
| Category | Cause |
|---|---|
Warning | Something about the request or its result should be reviewed. |
DeprecationWarning | The request uses an endpoint, parameter, or behavior that will be removed in the future. |
A single response may contain more than one warning. HTTP header names are
case-insensitive, so HTTP/2 clients will typically report the header in
lowercase as x-warning.
Reading warnings
To read warnings, check each response for the X-Warning header, parse its
value as JSON, and split each element on the first : to separate the
category from the message.
Messages are intended to be human-readable and may change between releases,
so your application should act on the category rather than matching on the
text of a message. We recommend logging every warning, and treating a
DeprecationWarning as a prompt to update your integration before the date
given in the message.
Common warnings
Warnings are currently returned in cases such as:
- A timeseries.get_range
request where one or more symbols did not resolve. These responses also use
the
206 Partial Contentstatus code. - A request with a time range that includes one or more days whose
dataset condition
is not
available. - A request that returns no data, or whose time range falls entirely inside a weekend.
- A streaming request larger than 5 GB, where batch download is recommended instead.
- An
mboordefinitionrequest whose time range does not begin at UTC midnight, so the snapshot records for that day are not included. - A request that uses a deprecated endpoint, parameter, or response format.
This list is not exhaustive, and new warnings may be added at any time.
Related: Errors.
1 2 3 4 5 6 7
curl -i -G 'https://hist.databento.com/v0/metadata.get_record_count' \
-u $YOUR_API_KEY: \
-d dataset=GLBX.MDP3 \
-d symbols=ESM2 \
-d schema=mbo \
-d start='2022-06-06T12:00' \
-d end='2022-06-06T12:10' 1 2 3 4 5 6 7 8
HTTP/2 200 date: Thu, 01 Oct 2026 14:32:11 GMT server: uvicorn content-length: 6 content-type: application/json x-warning: ["Warning: The request time range does not start at UTC midnight, which contains a synthetic snapshot of the full order book state. See: https://databento.com/docs/schemas-and-data-formats/mbo#snapshots"] 184621