CuteMarkets Docs

API Reference

Everything you need to integrate market data, build faster, and scale.

Docs

Tip: open /docs/market-hours-timestamps-timezones.md directly for raw markdown (easy copy/paste into an LLM).

Market-data timestamps are not formatting details. They decide whether a quote was available before a signal, whether a bar belongs to premarket or regular trading, whether a WebSocket row is stale, and whether a backtest is using information from the future.

This guide defines the timestamp and session vocabulary CuteMarkets uses across stocks, options, REST APIs, WebSocket workflows, caches, and replay artifacts. Pair it with Market Data Access Methods, Market Data Ingestion and Caching, Quotes, Trades, and Aggregates, Live, Delayed, and Entitlements, and Historical Options Replay Runbook.

Core terms

TermMeaning
Event timestampThe time attached to a trade, quote, bar, stream update, or calculated value
Request timestampThe time your application requested data from the API
Decision timestampThe time a strategy or user made a decision
Bar open timestampThe start of an aggregate interval
Bar close timestampThe end of an aggregate interval
Market timezoneThe session timezone used to interpret regular hours, premarket, after-hours, and holidays
UTCCoordinated Universal Time, useful for storage and cross-region systems
ETEastern Time, the practical session timezone for U.S. equities and listed options
Quote ageThe difference between decision time and the latest usable bid/ask quote
Stale thresholdThe maximum acceptable age before data is labeled stale or rejected
Session labelA tag such as premarket, regular, after-hours, closed, holiday, or unknown

UTC for storage, ET for session reasoning

Store timestamps in UTC whenever possible. Convert to Eastern Time when the workflow needs to reason about U.S. market sessions. This avoids ambiguous daylight-saving transitions and keeps distributed systems consistent.

A clean artifact stores both:

bash
{
  "event_timestamp_utc": "2026-06-04T15:31:42.120Z",
  "event_timestamp_et": "2026-06-04T11:31:42.120-04:00",
  "session_label": "regular",
  "market": "US_OPTIONS",
  "source": "quotes",
  "timezone_policy": "store_utc_display_et"
}

The same policy applies to Options Quotes, Options Trades, Options Aggregates, Stock Trades and Quotes, and Stock Aggregates and Indicators.

Session labels

Market sessions need explicit labels because "today" is not enough. U.S. stock workflows can involve premarket, regular hours, after-hours, half days, holidays, and overnight gaps. U.S. listed-options workflows generally focus on regular hours, with some products and venues having special behavior.

Use a session label in every live dashboard, scanner, and backtest artifact:

LabelUse
premarketStock activity before regular session where supported
regularMain U.S. market session
after_hoursStock activity after regular session where supported
closedNo active session for the product
holidayMarket holiday or special closure
half_dayShortened session
unknownProvider or application cannot classify the timestamp

Do not copy stock session assumptions directly into options workflows. If an options strategy depends on exact session behavior, record the product, venue assumption, and data object. A stock bar in premarket can trigger a watchlist event, but an option quote window may still be unavailable or irrelevant for the intended fill.

Quotes, trades, and bars use timestamps differently

The same timestamp string means different things depending on the object:

ObjectTimestamp meaningCommon mistake
QuoteWhen the bid/ask market update was observed or effectiveTreating an old quote as current
TradeWhen a transaction print occurredTreating the print as a fillable market later
AggregateThe time window represented by the barFilling inside a bar after using completed-bar information
SnapshotCurrent state assembled from recent fieldsTreating latest state as a historical replay
IndicatorThe bar window used to calculate the valueUsing an indicator value before its input bar closed
WebSocket eventStream update arrival or event time depending on fieldTreating client receipt time as market event time

For options execution realism, the critical value is quote age. A strategy decision at 10:15:00 ET should not fill from a quote last updated at 10:09:00 ET unless the policy allows it and the artifact says so. See Backtesting Execution Realism, Why Option Quotes Matter More Than Last Price, and Quote-Aware Options Backtests.

Completed bars and same-bar risk

Completed bars create a common lookahead bug. If a signal uses a completed 5-minute stock bar ending at 10:35:00 ET, the decision cannot also claim an option fill at 10:33:00 ET from inside that same bar. The strategy did not know the bar outcome at 10:33.

A safer artifact stores:

  • signal bar start
  • signal bar end
  • decision timestamp
  • next observable quote timestamp
  • quote age
  • fill timestamp
  • fill policy
  • reject reason if the first available quote fails

Use Same-Bar Fill Lookahead, Backtesting Engine Loop, Stock and Options Data Join Workflow, and Historical Market Data Ingestion and Cache Design for the implementation path.

WebSocket timestamps

Live systems need to separate event time from client time:

  • event timestamp from the data record
  • server receive timestamp where available
  • client receive timestamp
  • last heartbeat timestamp
  • last reconnect timestamp
  • last REST backfill timestamp

A row can be live by plan but stale by event age. A WebSocket can be connected but still behind if the topic has not received an event. That is why WebSocket docs, REST vs WebSocket Market Data API Guide, and Real-Time Options System Design include freshness labels and reconnect backfills.

Historical replay timestamp checklist

Before trusting a historical replay:

  1. Store the event timestamp in UTC.
  2. Convert it to ET for session classification.
  3. Record the decision timestamp separately from request timestamp.
  4. Confirm whether aggregate timestamps refer to bar open or bar close.
  5. Confirm quote age at entry and exit.
  6. Store the first usable quote after the decision.
  7. Record empty quote windows as rejects.
  8. Preserve pagination state for dense quote or trade windows.
  9. Store live, delayed, historical, cached, or backfilled labels.
  10. Attach the replay manifest to the result.

This checklist belongs in Historical Options Data API, Options Backtesting API, Backtesting Data Quality Checklist, and Market Data Corrections and Missing Data.

UI labels

User-facing applications need language that prevents overclaiming:

LabelMeaning
Live quoteCurrent plan and endpoint support live quote access
Delayed quoteQuote is delayed by plan or feed
Stale quoteQuote exists but is older than policy
Historical quoteQuote was requested for a past window
Backfilled quoteQuote came from REST repair after a live gap
No usable quoteQuote is missing, stale, no-bid, or outside policy
Bar signalSignal came from a completed aggregate interval
Session closedProduct session is not active for the timestamp

The UI label can link to Live, Delayed, and Entitlements, Quotes, Stock Trades and Quotes, and Market Data Licensing and Commercial Use.

Related reading

Timestamp implementation notes

Timestamp handling needs separate fields for request time, exchange or SIP timestamp, application receive time, bar start, bar end, and decision time. A stock signal and option quote may share a calendar date while still being unusable together. Store the exact timestamp that caused the next request, especially when joining Stock Aggregates and Indicators to Option Chain.

Market-session labels also matter. Premarket, regular session, after-hours, holiday, half-day, halted, delayed, and stale states can all change how a scanner interprets a row. Pair this page with Live and Delayed Entitlements and Backtesting Execution Realism before using quote age or completed bars in a fill model.

Terminology

Terms to keep straight on this page

Market-data APIs use similar words for different objects. These links keep the docs page connected to the precise CuteMarkets workflow and related reference material.

OPRA-originating data

The listed-options source context behind quotes, trades, participant records, exchange context, and consolidated option-market data.

SIP and direct feed

Market-data delivery paths that explain where consolidated equities and options records originate before a normalized API returns them.

Quote, trade, aggregate

Three different price semantics: executable bid/ask market, printed transaction, and bar-level summary.

Quote/trade condition

The sale condition, quote condition, exchange id, correction, sequence, and timestamp context attached to market-data rows.

Contract identity

The OCC symbol, expiration, strike, side, root, and reference data needed to preserve the exact option being studied.

Entitlement gate

A plan-aware check that prevents live, quote, WebSocket, or historical behavior from being implied when the product does not include it.

Access method

The delivery mode for data, such as REST request, WebSocket stream, historical window, flat file, or local cache.

Backfill window

A timestamp-bounded REST request used to repair or complete data after a stream gap, retry, deploy, or cache miss.

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 required contracts, quotes, timestamps, pagination, or entitlements failed policy.

Commercial-use boundary

The product, plan, display, redistribution, and customer-facing use context that must be reviewed before shipping market data.

Adjusted option deliverable

The changed deliverable or contract terms that can appear after splits, mergers, special dividends, or other corporate actions.

Next steps

Move from the docs into the product workflow

If you are evaluating the API rather than implementing a specific endpoint right now, the product pages map live and historical workflows for stocks, options, and WebSockets.