Market Data Timestamps and Trading Sessions API Guide

Daniel Ratke
Research & Engineering
Market Data Timestamps and Trading Sessions API Guide
Store market-data timestamps in UTC, convert to Eastern Time for U.S. session reasoning, and keep event time, request time, decision time, bar open or close time, quote age, WebSocket receipt time, and backfill time separate.

Term map
Market-data infrastructure vocabulary for this article
Use REST snapshot, WebSocket stream, flat file, cache key, backfill window, response envelope, rate-limit budget, session label, entitlement gate, and commercial-use boundary as implementation terms. They describe the system behind the data, more than the displayed quote.
Follow the linked definitions for REST snapshot, WebSocket stream, Flat file, Cache key, Backfill window, Condition-code policy, Entitlement gate, Commercial-use boundary, Replay manifest, Response envelope, Rate-limit budget, and Session label.
Timestamp handling is one of the fastest ways to tell whether a market-data workflow is serious. A backtest can be invalid because a signal used a completed bar too early. A live dashboard can mislead users because a quote is stale. A scanner can rank an option because it crossed a volume threshold outside the intended session. A cache can mix UTC storage with Eastern Time session assumptions.
This guide explains how developers should think about market-data timestamps, U.S. trading sessions, UTC versus ET, quote age, completed bars, WebSocket event time, and replay artifacts. Use it with Market Hours, Timestamps, and Timezones, Market Data Access Methods, Real-Time Options System Design, and Stock and Options Data Join Workflow.
Quick answer
Store timestamps in UTC, convert to Eastern Time for U.S. session reasoning, and keep event timestamp, request timestamp, decision timestamp, bar open or close timestamp, quote age, WebSocket receipt time, and backfill time separate. A strategy should not use a completed bar and also claim a fill inside that same completed interval unless standing order state is modeled explicitly.
The timestamp fields developers need
Market data systems often need more than one timestamp:
| Timestamp | What it answers |
|---|---|
| Event timestamp | When the trade, quote, bar, or stream update happened |
| Request timestamp | When the client asked the API for data |
| Decision timestamp | When the strategy or user made a decision |
| Bar start | When an aggregate interval begins |
| Bar end | When an aggregate interval is complete |
| Client receipt time | When the browser, service, or worker received a stream event |
| Last heartbeat | Whether a WebSocket connection is still alive |
| Backfill timestamp | When REST repaired a missing interval |
| Cache retrieval timestamp | When a stored artifact was loaded or refreshed |
Do not collapse these into timestamp without context. The right field depends on whether the workflow is Options Quotes, Options Trades, Stock Trades and Quotes, Options Aggregates, Stock Aggregates, or WebSockets.
UTC storage, Eastern Time interpretation
UTC is good for storage. Eastern Time is necessary for U.S. trading-session interpretation. If an artifact stores only local browser time, a replay can drift across timezones, daylight-saving changes, and server regions.
The practical pattern:
- Parse provider timestamps into UTC.
- Store the UTC timestamp in the artifact.
- Convert to ET for session labels.
- Store the session label.
- Store the original provider field if downstream audits need it.
For example:
{
"event_timestamp_utc": "2026-06-04T14:35:00Z",
"event_timestamp_et": "2026-06-04T10:35:00-04:00",
"session_label": "regular",
"data_object": "stock_aggregate",
"bar_interval": "5m",
"bar_timestamp_policy": "bar_close"
}
Session labels protect product behavior
Trading sessions affect what an app can claim. A stock dashboard might care about premarket and after-hours. An options backtest may focus on regular session quote windows. A holiday or half day can invalidate generated date assumptions.
Use labels:
premarketregularafter_hoursclosedholidayhalf_dayunknown
The session label belongs beside plan and freshness labels from Live, Delayed, and Entitlements. A row can be live by plan and stale by quote age. A row can be current for stock context but not enough for an option fill. A row can be historical and still outside the intended session.
Completed bars create lookahead risk
The most common timestamp bug is same-bar lookahead. Suppose a 5-minute bar ends at 10:35 ET and a strategy uses the completed OHLC values to generate a signal. The decision occurs at or after 10:35. The backtest cannot then claim it bought an option at a quote from 10:33 unless the order was already resting before the bar completed.
A correct artifact records:
- input bar start and end
- signal calculation time
- first eligible decision time
- first usable quote after decision
- quote age
- bid, ask, midpoint, and spread percent
- fill policy
- reject reason if no usable quote exists
This connects directly to Same-Bar Fill Lookahead, Options Backtesting API, Backtesting Engine Loop, and Quote-Aware Options Backtests.
Quote age matters more than latest price
For options, a quote can be technically present but too old to trust. Store quote age as a computed field:
quote_age_ms = decision_timestamp_ms - quote_timestamp_ms
Then apply policy:
| Policy state | Meaning |
|---|---|
| usable | Quote age and spread are inside policy |
| stale | Quote is older than threshold |
| no bid | Exit-side bid is missing |
| wide spread | Spread percent is above threshold |
| no quote | No quote exists in the window |
| delayed | Data is delayed by entitlement |
This is why Historical Options Quotes API, Why Option Quotes Matter More Than Last Price, Backtesting Execution Realism, and Options Flow False Positives should be read together.
WebSocket event time versus receipt time
Live streams add another timestamp layer. Your application can record:
- event timestamp from the data payload
- server receive time where available
- client receive time
- heartbeat time
- reconnect time
- REST backfill time
If client receipt time drifts far from event time, show stale state or trigger a backfill. If a stream reconnects, use REST to repair the missing interval and store that backfill label. The practical architecture is covered in REST vs WebSocket Market Data API Guide, WebSocket docs, and Market Data Ingestion and Caching.
Timestamp checklist for provider evaluation
When comparing providers, ask:
- Are timestamps UTC, ET, exchange-local, or unspecified?
- Are timestamp units seconds, milliseconds, microseconds, or nanoseconds?
- Are aggregate timestamps bar open or bar close?
- Are quote and trade timestamps event time or receipt time?
- How are premarket, regular, after-hours, half-day, and holiday sessions represented?
- Are delayed feeds labeled clearly?
- Can empty windows be distinguished from errors?
- Can WebSocket gaps be backfilled through REST?
- Are corrected records versioned or refreshed?
Use Market Data API Due Diligence Checklist, Market Data Corrections and Missing Data, Options Data Provider Evaluation, and Stock Data Provider Evaluation to turn those questions into a scorecard.
Final rule
A timestamp is evidence. Store enough timestamp context for another developer to know what the workflow knew, when it knew it, which session it belonged to, and whether the data was fresh enough to use.
How the terminology applies
For Market Data Timestamps and Trading Sessions API Guide, the market-data infrastructure workflow should treat REST snapshot, WebSocket stream, Flat file, Cache key, Backfill window, and Condition-code policy as operational state rather than glossary decoration. That framing keeps ingestion, replay, access control, caching, and delivery mode visible in the same place as the market value.
A developer implementing this Infrastructure idea should persist Entitlement gate, Commercial-use boundary, Replay manifest, Response envelope, Rate-limit budget, and Session label beside the result, instead of leaving those words in a term card. It also makes outages, reconnects, schema changes, and entitlement failures easier to review because they leave concrete artifacts.
The review artifact for Market Data Timestamps and Trading Sessions API Guide becomes more useful when Data-quality reject, Ingestion watermark, Schema version, Reconnect gap, Subscription topic, and Provider lineage appear in the same body of evidence as the selected rows. When the page describes architecture, these fields should shape logs, storage keys, retries, alerts, and backfill repair jobs.
In production notes for this market-data infrastructure workflow, Warehouse export, Options data API, OPRA-originating data, OCC option symbol, Bid/ask spread, and Midpoint define the checks that decide whether the workflow is reproducible. The result is infrastructure that can explain why a value appeared, disappeared, changed, or was withheld from a user-facing workflow.
For Market Data Timestamps and Trading Sessions API Guide, the practical acceptance test is simple: another developer should be able to read the body, identify the exact inputs, reproduce the request sequence, and explain the accepted and rejected rows without relying on the bottom terminology grid. If a phrase appears in the page vocabulary, it should correspond to a stored field, a validation check, a replay step, or an implementation decision in the market-data infrastructure workflow.
This is also the reason the article should not measure success only by the final chart, table, or headline metric. The better standard is whether the data path, timing model, entitlement state, and evidence trail survive review. When those pieces are written directly into the body, the terminology becomes part of the workflow readers can implement.
Terminology
Market-data terms used in this article
These terms keep the article connected to the CuteMarkets knowledge base and to the exact API workflow behind the research.
REST snapshot
A reproducible request for current or historical state, useful for initialization, pagination, and audit artifacts.
WebSocket stream
A persistent authenticated connection for live updates, reconnect tracking, freshness labels, and selected subscriptions.
Flat file
A downloadable batch archive such as CSV or parquet that belongs in a warehouse-style provider evaluation.
Cache key
The structured identifier that keeps provider, endpoint, ticker, timestamp, entitlement, and schema state separate.
Backfill window
A timestamp interval requested through REST to repair a stream gap, retry failure, or missing cache interval.
Condition-code policy
The include, exclude, preserve, and reject rules that decide how quote and trade conditions affect artifacts.
Entitlement gate
The plan and product check for live, delayed, quote, stream, historical, or commercial-use access.
Commercial-use boundary
The internal, customer-facing, display, redistribution, and resale context that must match the selected plan.
Replay manifest
The saved source request, selected instrument, quotes, trades, fills, rejects, and freshness evidence for an audited run.
Response envelope
The shared status, request id, results, pagination, and error shape used by API wrappers and ingestion logs.
Rate-limit budget
The request capacity that shapes polling, scanner pagination, quote-window backfills, retries, and degraded mode.
Session label
A premarket, regular, after-hours, closed, half-day, holiday, or unknown tag attached to a market-data timestamp.
Data-quality reject
A logged reason for skipping a candidate because quotes, contracts, timestamps, pagination, entitlements, or corrections failed policy.
Ingestion watermark
The latest complete timestamp for a stream, file, cache partition, or REST backfill job.
Schema version
The response-shape version that keeps SDKs, warehouses, and dashboards from silently mixing incompatible fields.
Reconnect gap
The interval between a lost stream connection and the next confirmed event, usually repaired with REST backfills.
Subscription topic
The stream selector for symbols, channels, or asset classes that determines which live events arrive.
Provider lineage
The source, feed, exchange, normalization, and entitlement context that explains where a market-data row came from.
Warehouse export
A batch or flat-file delivery path for historical archives, reconciliation, and large-scale research jobs.
Options data API
The product surface for chains, contracts, quotes, trades, aggregates, Greeks, IV, open interest, and expirations.
OPRA-originating data
The U.S. listed-options source context behind quotes, trades, exchange participation, and consolidated option-market records.
OCC option symbol
The exact option contract identifier that preserves root, expiration, call or put side, and strike.
Bid/ask spread
The execution interval between bid and ask that determines whether a contract is realistically tradable.
Midpoint
The computed center between bid and ask, useful as a reference price but not proof that an order would fill.
FAQ
Related questions
Should market-data timestamps be stored in UTC or Eastern Time?
Store timestamps in UTC for systems and convert to Eastern Time when classifying U.S. trading sessions, market hours, half days, and holidays.
Why do completed bars create lookahead risk?
A strategy that uses a completed bar cannot also claim a fill inside that same completed interval unless a resting order was already modeled.

Written by
Daniel Ratke
Research & Engineering
Daniel covers the deeper research notes: options backtesting, execution realism, robustness testing, data engineering, and strategy validation.
Product links
Build the workflow with CuteMarkets
This article is part of the broader CuteMarkets product and research stack. Use the landing pages below to move from the blog into the specific API workflow you want to evaluate.
Market Hours and Timestamps
Use the knowledge-base guide for UTC, ET, session labels, quote age, completed bars, and WebSocket timestamps.
Stock and Options Join Workflow
Tie stock signal timestamps to option expirations, chains, contracts, quote windows, and selected legs.
Backtesting Engine Loop
Preserve causal timing from signal timestamp to contract selection, fill evidence, exits, and artifacts.
Real-Time Options System Design
Keep WebSocket event time, reconnect time, backfills, stale rows, and freshness labels visible.