Order Flow Consolidated

Overview

Order Flow Consolidated returns per-row consolidated option trades: blocks, splits, sweeps, and (when requested) their comprising trades. Rows are paginated with cursor semantics, and every projectable field is returned by default. Use this when you want per-trade visibility into how the tape is grouped.

POST/v1/options/tool/order-flow/consolidated
curl -X POST https://api.quantdata.us/v1/options/tool/order-flow/consolidated \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "sessionDate": "2026-05-13",
    "filter": { "ticker": "AAPL" }
  }'

Selecting the time window

The endpoint accepts sessionDate, timeRange, or neither. The two are mutually exclusive; if both are omitted, the most recent trading session is used.

Pagination and sort

Order Flow Consolidated uses cursor pagination. size sets the page size (default 50, range 1-100). sort picks the order (default tradeTime DESCENDING). Pass the previous response's nextSearchAfter back as searchAfter to get the next page. See Pagination for the full walk-through.

Subsequent page · cursor + explicit sort

Request · size + sort + searchAfter
{
  "sessionDate": "2026-05-13",
  "filter": { "ticker": "AAPL" },
  "size": 50,
  "sort": { "field": "tradeTime", "direction": "DESCENDING" },
  "searchAfter": ["1747137600000", "9c2a4f08"]
}

sort.field accepts any filterable field on the consolidated row (the same names you can filter on); direction is ASCENDING or DESCENDING. When the result set is empty or the final page has been served, nextSearchAfter is omitted from the response.

Two additional toggles are exclusive to this endpoint: includeComprisingTrades (default false) returns the underlying trades for each block / split / sweep; includeStatistics (default false) attaches a per-(contract type, trade side) aggregation to the first page only.

First page with comprising trades + statistics

Request · includeStatistics + includeComprisingTrades
{
  "sessionDate": "2026-05-13",
  "filter": { "ticker": "AAPL" },
  "includeStatistics": true,
  "includeComprisingTrades": true
}

Projection

includes is a whitelist of fields to keep on each row; excludes is a blacklist. The two are mutually exclusive. Omitted fields are dropped from the JSON entirely. See Projection for the full contract.

Includes · keep just the columns you need

Request · includes
{
  "sessionDate": "2026-05-13",
  "filter": { "ticker": "AAPL" },
  "includes": ["ID", "TICKER", "PREMIUM", "TRADE_TIME", "TRADE_CONSOLIDATION_TYPE"]
}

Response shape

data is an ordered array of rows. nextSearchAfter is the cursor for the next page (or omitted when none). statistics is present only on the first page when includeStatistics is true.

200 OK · application/json
{
  "data": [
    {
      "id": "5f4c2e9a",
      "ticker": "AAPL",
      "contractType": "CALL",
      "expirationDate": "2026-05-16",
      "dte": 3.0,
      "strikePrice": 220.0,
      "premium": 142500.00,
      "size": 500,
      "volume": 500,
      "optionPrice": 2.85,
      "stockPrice": 213.45,
      "tradeSideCode": "ABOVE_ASK",
      "tradeConsolidationType": "SWEEP",
      "isGoldenSweep": false,
      "isUnusual": true,
      "tradeTime": 1747137612000
    }
  ],
  "nextSearchAfter": ["1747137612000", "5f4c2e9a"]
}

Per-row fields (every field is nullable for projection):

  • Identity: id, ticker, contractType, expirationDate, dte, strikePrice, sector, industry, exchange.
  • Sizing: premium, size, volume, openInterest.
  • Pricing: optionPrice, askPrice, bidPrice, bidAskSpread, stockPrice, impliedVolatility.
  • Classification: tradeSideCode, tradeType, tradeConsolidationType, sentimentType, isGoldenSweep, isUnusual, isOpeningPosition, isETF, isIndex, isVolumeGreaterThanOpenInterest.
  • Nested: greeks (charm, delta, gamma, theta, vega, etc.), moneyness (degree, degreeInPercent, moneyType), comprisingTrades (per-underlying-trade subset, returned only when includeComprisingTrades is true).
  • Time: tradeTime (epoch-millisecond Long).

Filters

Convenience filter fields cover the full consolidated-trade inventory: tickers, sectors, industries, contractTypes, moneyTypes, strikePrices, strikePriceRange, expirationDates, expirationDateRange, tradeSideCodes, tradeTypes, tradeConsolidationTypes, sentimentTypes, exchanges, premiumRange, volumeRange, sizeRange, isGoldenSweep, isUnusual, isOpeningPosition, isVolumeGreaterThanOpenInterest, and more. All are optional. The filterExpression DSL is also accepted and can be combined with filter; both are evaluated as AND.

See Field Reference for the type and allowed values of every filterable field, and Filter Expression for the full DSL grammar.

Where to go next