Intraday replay
Our live API offers intraday replay within the last 24 hours. On weekends and other periods when data isn't being published, the gateway may report less than 24 hours of replay available. Users can connect to the live service and request data from a particular start time. Data will be filtered on ts_event for all schemas except CBBO and BBO, which will be filtered on ts_recv.
A different start time can be specified for each subscription. There can be multiple subscriptions for the same schema, with each subscription having a different start time. When the session starts, records will be immediately replayed for each schema. A replay completed SystemMsg will be sent for each replayed schema once it catches up to real-time data. Once a session has started, newly added subscriptions are not eligible for intraday replay.
As a special case for the GLBX.MDP3 dataset, we also provide replay of the entire weekly session in the MBO and definition schemas outside of the 24-hour window to aid with recovery, as these schemas are highly stateful.
Pass start=0 to easily request the full replay history available for each schema.
Our Python client library supports several convenient date formats, such as pd.Timestamp, Python datetime, Python date, ISO 8601 strings, or UNIX timestamps in nanoseconds. Refer to the Dates and times article for more information on how our client library handles timestamps.
1 2 3 4 5 6 7 8 9 10 11 12 13
import databento as db
# Create a live client
client = db.Live(key="$YOUR_API_KEY")
# Subscribe with a specified start time for intraday replay
client.subscribe(
dataset="GLBX.MDP3",
schema="trades",
symbols="ES.FUT",
stype_in="parent",
start="2023-04-17T09:00:00",
)