Conventions

Request shape

Every endpoint takes a POST with a JSON body. The conventions described on this page apply uniformly across every endpoint.

Canonical request
POST /v1/options/tool/gainers-losers HTTP/1.1
Host: api.quantdata.us
Authorization: Bearer <YOUR_API_KEY>
Content-Type: application/json

{
  "sessionDate": "2026-05-13",
  "filter": {
    "ticker": "AAPL"
  }
}

The body is a single JSON object. For tools like Gainers / Losers above, every field is optional and an empty {} returns data for the latest session. Other tools require specific filters (Exposure By Strike, for example, requires a ticker). Top-level fields fall into three rough buckets: when (sessionDate, timeRange), what to include (filter, filterExpression), and how to slice the result. The slice fields vary by tool: aggregationPeriod on time-series tools, and includes, excludes, size, sort on the table-shaped tools.

Field names

Field references inside filterExpression, sort.field, and the includes / excludes arrays are matched case-, separator-, and whitespace-insensitively.

Four equivalent spellings
{
  "filterExpression": {
    "field": "STRIKE_PRICE",
    "operation": "=",
    "value": "150"
  }
}

// All four of these resolve to the same field:
//   "STRIKE_PRICE", "strikePrice", "strike-price", "Strike Price"

The convenience filter object is different: it uses standard camelCase JSON property names (e.g. tickers, expirationDate), and only those exact names are accepted. Enum values keep the canonical UPPER_SNAKE_CASE form on both the request and the response.

Many fields also have shorthand aliases beyond the canonical name: STRIKE resolves to STRIKE_PRICE, IV to IMPLIED_VOLATILITY, OI to OPEN_INTEREST. See Field Reference for the per-endpoint inventory.

Plural and singular

Collection-typed fields accept either the singular or the plural name, with either a scalar or an array value.

Four shapes, one filter
// All four shapes resolve to the same single-element collection.
{ "ticker": "AAPL" }
{ "ticker": ["AAPL"] }
{ "tickers": "AAPL" }
{ "tickers": ["AAPL"] }

// And a real multi-value request:
{ "tickers": ["AAPL", "NVDA", "TSLA"] }

The same convention applies to expirationDates, strikePrices, contractTypes, sectors, industries, and every other plural-named field. If you send both the plural and the singular alias in the same JSON object, the last one in source order wins.

Operation aliases

Filter operations accept symbolic, abbreviated, and full-name forms.

Six comparisons, multiple spellings
// The six comparisons each accept symbolic, abbreviated, and full-name forms.
//   =    ==    EQ     EQUAL               EQUALS
//   !=   <>    NEQ    NOT_EQUAL           DOES_NOT_EQUAL
//   <          LT     LESS                LESS_THAN
//   <=         LTE    LE                  LESS_THAN_OR_EQUAL_TO
//   >          GT     GREATER             GREATER_THAN
//   >=         GTE    GE                  GREATER_THAN_OR_EQUAL_TO

// These three filters do the same thing:
{ "field": "STRIKE_PRICE", "operation": "=", "value": "150" }
{ "field": "STRIKE_PRICE", "operation": "EQ", "value": "150" }
{ "field": "STRIKE_PRICE", "operation": "EQUALS", "value": "150" }

Defaults

Most inputs have a useful default, chosen so the simplest possible request still returns useful data. Override any one without having to set the others.

What gets defaulted
  • sessionDate / timeRange: omit both and you get the latest completed trading session.
  • aggregationPeriod: auto-picked from the window length on time-series tools (e.g. 1m for a single session, 1h for a 30-day span, 1d for a year).
  • size: 50 records per page on the table-shaped tools. Valid range is 1100 when supplied.
  • includes / excludes: empty on the table-shaped tools that accept them, returning every projectable field per row. The remaining endpoints have no projection slot. Their responses are always full.
  • filter / filterExpression: empty, returning every row that falls within the time window.
  • sort: only applies to the table-shaped tools. Defaults to tradeTime DESCENDING on those.

Units and formats

Requests use ISO date and instant strings for time. Responses use epoch milliseconds. Monetary values are dollars on both the request and the response.

On the request
  • sessionDate is a calendar date string: YYYY-MM-DD.
  • timeRange.startTime and timeRange.endTime are ISO 8601 instants: 2026-05-13T14:30:00Z. startTime is inclusive; endTime is exclusive.
  • expirationDates are ISO calendar dates: 2026-06-19.
  • Premium, notional, and price filter values are dollars with decimals (e.g. 150.25), not cents.
On the response
  • Time-series tools key their data map by epoch milliseconds (1778679000000), one bucket per aggregationPeriod.
  • tradeTime on row records is also epoch milliseconds.
  • Premium, notional value, and price fields are dollars with decimals. Volume and size are integer counts.
  • Enum-valued fields echo the canonical UPPER_SNAKE_CASE name, regardless of which alias you sent.

Where to go next