# Generated by tools/build_contracts.py from tools/algoseek_catalog.py -- do not edit by hand.
# Open Data Contract Standard v3.2.0 (https://bitol-io.github.io/open-data-contract-standard/).
apiVersion: v3.2.0
kind: DataContract
id: urn:alphaswarm:datacontract:algoseek:us-options-continuous-trade-and-quote-minute-bar
name: AlgoSeek US Options Continuous Trade and Quote Minute Bar
version: 0.1.0
status: draft
domain: market-data
tags:
- algoseek
- licensed-data
- options
- opra
- us
- bar
description:
  purpose: 'Same 60-field one-minute options TAQ bar as the regular minute bar, but gap-free: during market
    hours every contract gets a bar each minute, and when no new quote arrives the prevailing NBBO bid/ask
    is carried forward into the bar. Built from OPRA consolidated trades and top-of-book quotes.'
  usage: Options pricing, volatility, and flow research on US-listed equity and index options.
  limitations: 'Delivered as recorded from the source feed: AlgoSeek does not remove crossed or locked
    quotes, bad prints, or out-of-sequence packets unless contracted to. Consumers own cleaning. KEY DIFFERENCE
    vs regular variant: per the guide, bars are continuous during market hours (up to 16:15:00 ET), so
    a bar is emitted every minute even when the contract has no bid, ask or trade event; outside market
    hours bars are event-based. The guide does not say whether contracts with no quote state at all, or
    equity options between 16:00 and 16:15, also get bars. Samples only show 09:30 bars. Carry-forward:
    if the NBBO bid/ask does not change in a minute, the prevailing NBBO (price, size and original event
    time) is carried in, so Open = High = Low = Close for that side and the time fields show the older
    event time. OpenBid*/OpenAsk* are the NBBO in force at bar open (not the first update inside the bar);
    CloseBid*/CloseAsk* are the NBBO in force at bar close. High/Low still span updates within the bar
    and the carried-in opening state. A 0.0000 price with size 0 (and a pre-open timestamp) appears in
    the sample for Open/Low bid and ask: this looks like a no-quote or empty-book state carried in. It
    makes MinSpread 0.0000 and MaxSpread equal to the ask in those rows, so treat spread statistics there
    with care.'
  authoritativeDefinitions:
  - type: businessDefinition
    url: https://algoseek.com/dataset/us-options-continuous-trade-and-quote-minute-bar/
  - type: implementation
    url: https://algoseek.com/data-docs/options-market-data/algoseek.US.Options.TAQ.Continuous.Minute.Bars.pdf
context:
  instructions: 'Identify a contract by underlying, expiration, strike and call/put. Most options tick
    files carry no underlying/root column: the underlying comes from the file path or API identifier,
    so keep it alongside every row you land. Strikes and prices are plain decimals (not scaled). EventType
    is a bit field: low 4 bits message type, 16 cancel, 32 call, 64 NBBO, 128 buy/bid side. Check OCC
    special settlements before comparing prices across a corporate action.'
  constraints:
  - id: c1
    constraint: 'Licensed vendor data: never export raw rows to a tenant-local destination or include
      them verbatim in a public artifact; serve only through entitlement-checked platform reads.'
  - id: c3
    constraint: Do not treat the vendor's `Ticker` as a stable identity across time; join on an AlgoSeek
      security key (SecId or ASID, which are distinct) or the platform symbol mapping.
servers:
- server: algoseek-s3
  type: s3
  environment: vendor
  description: AlgoSeek flat-file delivery (the layout the schema below describes).
  location: s3://${ALGOSEEK_S3_BUCKET_OPT_CTAQ_1MIN}/
  format: csv
  encoding: UTF-8
  customProperties:
  - property: layout
    value: Plain-text CSV with fixed header, gzip-compressed (uncompressed about 7x larger). One file
      per underlying ticker per trading day per option chain (ticker + expiration date). Bars ordered
      by time. Bucket/path naming not stated.
  - property: compression
    value: gzip
  - property: header
    value: true
  - property: entitlement
    value: Bucket access is granted per subscription; bucket names arrive with license provisioning.
schema:
- name: us_options_continuous_trade_and_quote_minute_bar
  physicalName: opt_ctaq_1min
  physicalType: file
  logicalType: object
  businessName: US Options Continuous Trade and Quote Minute Bar
  description: 'Same 60-field one-minute options TAQ bar as the regular minute bar, but gap-free: during
    market hours every contract gets a bar each minute, and when no new quote arrives the prevailing NBBO
    bid/ask is carried forward into the bar. Built from OPRA consolidated trades and top-of-book quotes.'
  dataGranularityDescription: one option contract (Ticker x CallPut x Strike x ExpirationDate) x one 1-minute
    bar (TimeBarStart) on one trading Date; during market hours (up to 16:15 ET) a bar is always emitted
    even with no events
  properties:
  - name: Date
    logicalType: date
    logicalTypeOptions:
      format: yyyymmdd
    physicalType: string (yyyymmdd) (csv text)
    description: Trading date of the bar
    primaryKey: true
    primaryKeyPosition: 1
    required: true
    partitioned: true
    partitionKeyPosition: 1
    customProperties:
    - property: nullMeaning
      value: Never
    - property: evidence
      value: guide+sample
  - name: TimeBarStart
    logicalType: time
    logicalTypeOptions:
      format: HH:MM:SS
    physicalType: string (HH:MM) (csv text)
    description: Start of the one-minute bar; guide says HH:MM, sample delivers HH:MM:SS (09:30:00)
    primaryKey: true
    primaryKeyPosition: 2
    required: true
    customProperties:
    - property: nullMeaning
      value: Never
    - property: evidence
      value: guide+sample
  - name: Ticker
    logicalType: string
    physicalType: string (csv text)
    description: Symbol name; sample shows the underlying/root (AAPL). Root vs underlying for index or
      adjusted roots is not stated
    primaryKey: true
    primaryKeyPosition: 3
    required: true
    partitioned: true
    partitionKeyPosition: 2
    customProperties:
    - property: nullMeaning
      value: Never
    - property: evidence
      value: guide+sample
  - name: CallPut
    logicalType: string
    physicalType: string (csv text)
    description: Option type, C = Call or P = Put
    primaryKey: true
    primaryKeyPosition: 4
    required: true
    enum:
    - value: C
      label: Call
    - value: P
      label: Put
    customProperties:
    - property: nullMeaning
      value: Never
    - property: evidence
      value: guide+sample
  - name: Strike
    logicalType: number
    physicalType: decimal (csv text)
    description: Fixed price at which the option can be exercised, quoted per share of underlying
    primaryKey: true
    primaryKeyPosition: 5
    required: true
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Never
    - property: evidence
      value: guide+sample
  - name: ExpirationDate
    logicalType: date
    logicalTypeOptions:
      format: yyyymmdd
    physicalType: string (yyyymmdd) (csv text)
    description: Expiration date of the option contract
    primaryKey: true
    primaryKeyPosition: 6
    required: true
    customProperties:
    - property: nullMeaning
      value: Never
    - property: evidence
      value: guide+sample
  - name: OpenBidTime
    logicalType: time
    logicalTypeOptions:
      format: HH:MM:SS.mmm
    physicalType: string (timestamp) (csv text)
    description: Time of the NBBO bid in force at bar open; carried forward, so it can precede the bar
      start
    customProperties:
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: OpenBidPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: NBBO bid price in force at bar open (current as of bar start)
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: OpenBidSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Size of the NBBO bid in force at bar open
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: OpenAskTime
    logicalType: time
    logicalTypeOptions:
      format: HH:MM:SS.mmm
    physicalType: string (timestamp) (csv text)
    description: Time of the NBBO ask in force at bar open; carried forward, so it can precede the bar
      start
    customProperties:
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: OpenAskPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: NBBO ask price in force at bar open (current as of bar start)
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: OpenAskSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Size of the NBBO ask in force at bar open
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: OpenTradeTime
    logicalType: time
    logicalTypeOptions:
      format: HH:MM:SS.mmm
    physicalType: string (timestamp) (csv text)
    description: Time of the first trade in the bar
    customProperties:
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: OpenTradePrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Price of the first trade in the bar
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: OpenTradeSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Contracts in the first trade in the bar
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: HighBidTime
    logicalType: time
    logicalTypeOptions:
      format: HH:MM:SS.mmm
    physicalType: string (timestamp) (csv text)
    description: Time of the highest NBBO bid price in the bar
    customProperties:
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: HighBidPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Highest NBBO bid price in the bar
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: HighBidSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Size at the highest NBBO bid
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: HighAskTime
    logicalType: time
    logicalTypeOptions:
      format: HH:MM:SS.mmm
    physicalType: string (timestamp) (csv text)
    description: Time of the highest NBBO ask price in the bar
    customProperties:
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: HighAskPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Highest NBBO ask price in the bar
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: HighAskSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Size at the highest NBBO ask
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: HighTradeTime
    logicalType: time
    logicalTypeOptions:
      format: HH:MM:SS.mmm
    physicalType: string (timestamp) (csv text)
    description: Time of the highest-priced trade in the bar
    customProperties:
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: HighTradePrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Price of the highest trade in the bar
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: HighTradeSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Contracts in the highest-priced trade
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: LowBidTime
    logicalType: time
    logicalTypeOptions:
      format: HH:MM:SS.mmm
    physicalType: string (timestamp) (csv text)
    description: Time of the lowest NBBO bid in the bar
    customProperties:
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: LowBidPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Lowest NBBO bid price in the bar
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: LowBidSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Size at the lowest NBBO bid
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: LowAskTime
    logicalType: time
    logicalTypeOptions:
      format: HH:MM:SS.mmm
    physicalType: string (timestamp) (csv text)
    description: Time of the lowest NBBO ask in the bar
    customProperties:
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: LowAskPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Lowest NBBO ask price in the bar
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: LowAskSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Size at the lowest NBBO ask
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: LowTradeTime
    logicalType: time
    logicalTypeOptions:
      format: HH:MM:SS.mmm
    physicalType: string (timestamp) (csv text)
    description: Time of the lowest-priced trade in the bar
    customProperties:
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: LowTradePrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Price of the lowest trade in the bar
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: LowTradeSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Contracts in the lowest-priced trade
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: CloseBidTime
    logicalType: time
    logicalTypeOptions:
      format: HH:MM:SS.mmm
    physicalType: string (timestamp) (csv text)
    description: Time of the NBBO bid in force at bar close
    customProperties:
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: CloseBidPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: NBBO bid price in force at bar close
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: CloseBidSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Size of the NBBO bid in force at bar close
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: CloseAskTime
    logicalType: time
    logicalTypeOptions:
      format: HH:MM:SS.mmm
    physicalType: string (timestamp) (csv text)
    description: Time of the NBBO ask in force at bar close
    customProperties:
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: CloseAskPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: NBBO ask price in force at bar close (guide text mislabels it as a bid)
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: CloseAskSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Size of the NBBO ask in force at bar close
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: CloseTradeTime
    logicalType: time
    logicalTypeOptions:
      format: HH:MM:SS.mmm
    physicalType: string (timestamp) (csv text)
    description: Time of the last trade in the bar
    customProperties:
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: CloseTradePrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Price of the last trade in the bar
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: CloseTradeSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Contracts in the last trade in the bar
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: UnderOpenBidPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Underlying NBBO bid at the millisecond of the bar open
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: UnderOpenAskPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Underlying NBBO ask at the millisecond of the bar open
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: UnderCloseBidPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Underlying NBBO bid at the millisecond of the bar close
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: UnderCloseAskPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Underlying NBBO ask at the millisecond of the bar close
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: MinSpread
    logicalType: number
    physicalType: decimal (csv text)
    description: Minimum bid-ask spread in the bar; sample shows 0.0000 when a 0/0 no-quote state is carried
      in
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: MaxSpread
    logicalType: number
    physicalType: decimal (csv text)
    description: Maximum bid-ask spread in the bar; sample values can equal the ask when the carried bid
      is 0.0000
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: CancelSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Contracts of trades canceled during this bar; the canceled trades may have occurred any
      time since the open
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: VolumeWeightPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Volume-weighted average trade price in the bar
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: NBBOQuoteCount
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Number of NBBO bid and ask quote updates in the bar
    customProperties:
    - property: unit
      value: count
    - property: nullMeaning
      value: '0'
    - property: evidence
      value: guide+sample
  - name: TradeAtBid
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Contracts traded at or below the NBBO bid (late prints can be below the bid)
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: TradeAtBidMid
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Contracts traded strictly between the NBBO bid and the mid-point
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: TradeAtMid
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Contracts traded exactly at the NBBO mid-point
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: TradeAtMidAsk
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Contracts traded strictly between the NBBO mid-point and the ask
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: TradeAtAsk
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Contracts traded at or above the NBBO ask
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: TradeAtCrossOrLocked
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Contracts traded while the NBBO was locked (bid = ask) or crossed (bid > ask)
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: Blank
    - property: evidence
      value: guide+sample
  - name: Volume
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Total contracts traded in the bar
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: '0'
    - property: evidence
      value: guide+sample
  - name: TotalTrades
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Total number of trades in the bar
    customProperties:
    - property: unit
      value: count
    - property: nullMeaning
      value: '0'
    - property: evidence
      value: guide+sample
  - name: FinraVolume
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Contracts traded off the public exchanges and reported as FINRA; relation to Volume not
      stated
    customProperties:
    - property: unit
      value: contracts
    - property: nullMeaning
      value: '0'
    - property: evidence
      value: guide+sample
  quality:
  - id: row_count_positive
    metric: rowCount
    mustBeGreaterThan: 0
    dimension: completeness
    severity: error
    description: Every delivered partition (trade date, or snapshot) carries at least one row.
  - id: primary_key_unique
    metric: duplicateValues
    mustBe: 0
    arguments:
      properties:
      - Date
      - TimeBarStart
      - Ticker
      - CallPut
      - Strike
      - ExpirationDate
    dimension: uniqueness
    severity: error
    description: The declared primary key is unique within each delivered partition (one file or table
      snapshot).
  - id: trade_high_ge_low
    type: sql
    description: HighTradePrice is never below LowTradePrice in the same row.
    query: SELECT COUNT(*) FROM {object} WHERE HighTradePrice IS NOT NULL AND LowTradePrice IS NOT NULL
      AND HighTradePrice < LowTradePrice
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: bid_high_ge_low
    type: sql
    description: HighBidPrice is never below LowBidPrice in the same row.
    query: SELECT COUNT(*) FROM {object} WHERE HighBidPrice IS NOT NULL AND LowBidPrice IS NOT NULL AND
      HighBidPrice < LowBidPrice
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: ask_high_ge_low
    type: sql
    description: HighAskPrice is never below LowAskPrice in the same row.
    query: SELECT COUNT(*) FROM {object} WHERE HighAskPrice IS NOT NULL AND LowAskPrice IS NOT NULL AND
      HighAskPrice < LowAskPrice
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: vwap_within_range
    type: sql
    description: VWAP (sum(price*shares)/sum(shares)) lies within the bar's trade range.
    query: SELECT COUNT(*) FROM {object} WHERE VolumeWeightPrice > HighTradePrice OR VolumeWeightPrice
      < LowTradePrice
    mustBe: 0
    dimension: accuracy
    severity: warning
  - id: CancelSize_non_negative
    type: sql
    description: CancelSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE CancelSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: CloseAskSize_non_negative
    type: sql
    description: CloseAskSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE CloseAskSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: CloseBidSize_non_negative
    type: sql
    description: CloseBidSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE CloseBidSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: CloseTradeSize_non_negative
    type: sql
    description: CloseTradeSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE CloseTradeSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: FinraVolume_non_negative
    type: sql
    description: FinraVolume is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE FinraVolume < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: HighAskSize_non_negative
    type: sql
    description: HighAskSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE HighAskSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: HighBidSize_non_negative
    type: sql
    description: HighBidSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE HighBidSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: HighTradeSize_non_negative
    type: sql
    description: HighTradeSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE HighTradeSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: LowAskSize_non_negative
    type: sql
    description: LowAskSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE LowAskSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: LowBidSize_non_negative
    type: sql
    description: LowBidSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE LowBidSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: LowTradeSize_non_negative
    type: sql
    description: LowTradeSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE LowTradeSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: NBBOQuoteCount_non_negative
    type: sql
    description: NBBOQuoteCount is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE NBBOQuoteCount < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: OpenAskSize_non_negative
    type: sql
    description: OpenAskSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE OpenAskSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: OpenBidSize_non_negative
    type: sql
    description: OpenBidSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE OpenBidSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: OpenTradeSize_non_negative
    type: sql
    description: OpenTradeSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE OpenTradeSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: TotalTrades_non_negative
    type: sql
    description: TotalTrades is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE TotalTrades < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: Volume_non_negative
    type: sql
    description: Volume is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE Volume < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: close_quote_not_crossed
    type: sql
    description: Closing NBBO is rarely crossed; AlgoSeek ships crossed quotes as-is, so this only warns.
    query: SELECT COUNT(*) FROM {object} WHERE CloseBidPrice > 0 AND CloseAskPrice > 0 AND CloseBidPrice
      > CloseAskPrice
    mustBe: 0
    dimension: accuracy
    severity: warning
support:
- channel: algoseek-support
  tool: email
  url: mailto:support@algoseek.com
  scope: issues
  description: Vendor support for data defects, missing days, and entitlement problems.
team:
  name: AlphaSwarm data engineering
slaProperties:
- id: retention
  property: retention
  value: license-term
  description: Retention of landed copies is bounded by the AlgoSeek license; purge on termination.
  driver: regulatory
customProperties:
- property: vendor
  value: AlgoSeek
- property: vendorDataGroup
  value: us-equity-opt
- property: vendorDatasetTextId
  value: opt_ctaq_1min
- property: vendorSampleUrl
  value: https://as-metadata-services-assets.s3.amazonaws.com/sample_data/cloud_storage/opt_ctaq_1min.csv
- property: assetClass
  value: option
- property: venues
  value:
  - OPRA consolidated feed (16 options exchanges; individual venues not named)
- property: coverage
  value: US listed options from the OPRA consolidated feed (16 options exchanges); guide intro names options
    on equities, ETFs, ETNs and ADRs. History start date is not stated.
- property: timezone
  value: America/New_York
- property: timestampFormat
  value: Event times HH:MM:SS.mmm (millisecond, no date part); TimeBarStart HH:MM:SS in sample (guide
    says HH:MM)
- property: sessionHours
  value: Bars continuous during market hours 09:30:00-16:15:00 ET (most options stop trading at 16:00,
    some index options at 16:15). Guide says bars outside market hours are event-based. No Curb-session
    statement in guide or page.
- property: priceAdjustment
  value: unadjusted
- property: licensedData
  value: true
- property: evidenceGrade
  value: vendor-doc
- property: knownIssues
  value:
  - Primary key is inferred; AlgoSeek's guide does not name one.
  - Update cadence and publication latency are not stated in the guide; confirm with AlgoSeek (or GET
    /v1/meta/datasets/{id}/status).
  - 'Doc discrepancy: TimeBarStart: guide says HH:MM for minute bars; the sample delivers HH:MM:SS (''09:30:00'').'
  - 'Doc discrepancy: Guide intro says the whole session is 9:30:00-16:15:00 ET and the Time Range section
    says data starts at 9:30, yet the Continuous Bars section says bars are event-based during pre- and
    post-market hours, implying bars outside 09:30-16:15.'
  - 'Doc discrepancy: Sample OpenBidTime/OpenAskTime/LowBidTime/LowAskTime are 09:25:xx, i.e. before the
    09:30 bar start, because the pre-open NBBO state is carried forward; the guide''s ''data starts at
    9:30'' wording does not reflect this.'
  - 'Doc discrepancy: Guide Table 3 describes CloseAskPrice as ''NBBO bid price at bar close'' (copy-paste
    slip); treated as the ask.'
  - 'Doc discrepancy: Guide Table 3 intro calls it the ''Options TAQ Minute Bar CSV file'' (copied from
    the regular guide); its Time Range says ''Most options stop trading at 16:00 ET'' whereas the regular
    guide says ''16 ET''.'
  - 'Doc discrepancy: Guide lists ''No Quote Bid/Ask NB'' as included quote events (not in the regular
    guide); sample shows these as 0.0000 price / 0 size quotes with pre-open timestamps.'
  - 'Doc discrepancy: Under* fields: Table 2 title says ''First and Last Event'' but the text says NBBO
    at the millisecond of the open/close of the bar. Comparing samples with the regular bar (second sample
    row) shows UnderClose equals the underlying quote at the end of the minute, not at the contract''s
    last event, so the bar-boundary reading is correct.'
  - 'Doc discrepancy: Guide TOC lists Appendix A (FAQ) on page 12 but the PDF text ends on page 10.'
  - 'Doc discrepancy: Guide columns match the 60-column sample header exactly, in the same order.'
contractCreatedTs: '2026-11-02T00:00:00Z'
