CuteMarkets Docs

API Reference

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

Docs

Tip: open /docs/backtesting-data-quality-checklist.md directly for raw markdown (easy copy/paste into an LLM).

Read this page with Backtesting Framework, Market Data Corrections and Missing Data, Historical Options Replay Runbook, Quotes, and Contracts.

A trading backtest is only as believable as the data decisions it records. The point is not to make every model conservative. The point is to make every assumption explicit enough that another developer can replay the run and understand why each trade was accepted, rejected, or skipped.

Use this checklist before promoting an options or stock strategy from research to paper trading.

Quick answer

A realistic backtest needs to preserve point-in-time instrument selection, row-level timestamps, source object semantics, quote freshness, spread checks, missing-data behavior, corporate-action handling, fees, slippage, and a manifest that names the data inputs. If any of those are missing, the result may still be useful exploration, but it is not production evidence.

The checklist

AreaRequired questionWhat to store
Instrument universeWhat symbols or contracts existed at the decision time?Ticker list, contract query, as_of, filters, and selected identifiers.
Source objectDid the model use quotes, trades, aggregates, snapshots, or reference?Endpoint, object type, request URL, and request id.
TimestampsWhat did the system know at decision time?Signal timestamp, row timestamps, bar boundaries, and execution timestamp.
QuotesWas bid/ask evidence available?Bid, ask, midpoint, spread, quote age, and quote timestamp.
TradesWas last-sale data used only for the right purpose?Trade price, size, condition context when available, and timestamp.
BarsWere bars complete before the signal fired?Bar start/end, OHLC, volume, trade count, and missing intervals.
Corporate actionsDid deliverables or symbols change?Contract reference fields, split-adjustment flags, and adjusted-contract reject reasons.
CostsWere fees and slippage included?Fee model, spread model, fill rule, and reject thresholds.
Missing dataWhat happened when data was missing or stale?Skip reason, fallback policy, and count of affected opportunities.
ManifestCan the run be replayed?Code version, data windows, endpoint versions, parameters, cache versions, and environment.

Point-in-time selection

The most damaging error is selecting instruments from information that was not available yet. For options, discover contracts with the relevant as_of date before requesting quotes, trades, or bars. For stocks, define the ticker universe that existed for the test date and store reference metadata used by the selector.

Do not fix an empty historical universe by substituting today's chain. Reject it and log the reason.

Quote-aware fills

Options backtests usually need quote context for entries and exits, not last trade alone. A fill rule can use midpoint, bid, ask, marketable-limit logic, or a slippage model, but it needs to be visible in the artifact.

At minimum, log:

  • Selected contract.
  • Signal timestamp.
  • Quote timestamp.
  • Bid and ask.
  • Spread width.
  • Quote age.
  • Fill price rule.
  • Reject reason when the quote is missing, stale, crossed, locked, or too wide.

Missing data policy

Missing data is not one condition. A contract might have no trades, no quotes in the window, no listed series on the research date, no aggregate bar because no qualifying trades occurred, or no entitlement for a quote endpoint. Treat those cases separately.

Good run reports include skip counts by reason. That prevents a strong-looking equity curve from hiding the fact that most opportunities were discarded by data availability.

Promotion gate

Before a model moves to paper trading, require:

  1. A saved manifest.
  2. Deterministic replay for a sample period.
  3. Quote-aware fill evidence for every filled option trade.
  4. Explicit skip reasons.
  5. Out-of-sample or walk-forward validation.
  6. Stress tests for spread, slippage, and missing-data assumptions.
  7. A paper-trading parity checklist.

Related CuteMarkets docs

Use this checklist alongside Market Data Corrections and Missing Data, Market Hours, Timestamps, and Time Zones, and Backtesting Execution Realism.

Quality review notes

A data-quality checklist is useful when every reject reason maps to a repair path. Missing contracts send the run back to Contracts. Stale quotes send it to Quotes with a narrower window. Bad bars send it to Aggregates and session handling. Entitlement errors send it to Live and Delayed Entitlements. Keep those destinations in the artifact so a failed run can be debugged without reading logs from three systems.

Use named reject states instead of vague booleans. Examples include contract_not_listed_as_of, expiration_not_listed, quote_window_empty, quote_too_old, spread_too_wide, no_bid_exit, trade_condition_excluded, bar_incomplete, cursor_incomplete, and plan_not_entitled. Those names give researchers and developers the same vocabulary when a backtest loses half its candidates after realistic filters.

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.