Available languages: [Python](https://databento.com/docs/api-live/message-flows/intraday-historical.python.md) · [C++](https://databento.com/docs/api-live/message-flows/intraday-historical.cpp.md) · [Rust](https://databento.com/docs/api-live/message-flows/intraday-historical.rust.md) · [Raw](https://databento.com/docs/api-live/message-flows/intraday-historical.raw.md)

Source: https://databento.com/docs/api-live/message-flows/intraday-historical


# Intraday historical subscription

After authenticating, the client can subscribe to intraday historical data.

The subscription mechanism is similar to live data: the client must send a
[subscription request](https://databento.com/docs/api-live/client-control-messages/subscription-request.md)
to the gateway, containing the `start` parameter which can be formatted as nanoseconds since
the UNIX epoch or as a datetime string of one of the formats listed in [Dates and times](https://databento.com/docs/api-live/basics/dates-and-times.md).

When handling an intraday historical subscription, the gateway will send all messages
beginning from the specified timestamp and, after catching up in time, will continue
sending live data as it arrives.

This makes intraday historical subscriptions the ideal way to deal with application restarts
on the client side.

Our gateways keep data from up to the last 24 hours to serve via the intraday historical API.
Requests for data over 24 hours old will be rejected.

## Example

To subscribe to trades for all E-mini S&P 500 Futures on CME starting from 2023-04-05 00:00:00 UTC,
the client would send:

`schema=trades|stype_in=parent|symbols=ES.FUT|start=1680652800000000000\n`

or

`schema=trades|stype_in=parent|symbols=ES.FUT|start=2023-04-05T00:00:00\n`
