# 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-trade-and-top-of-book-quote
name: AlgoSeek US Options Trade and Top of Book Quote
version: 0.1.0
status: draft
domain: market-data
tags:
- algoseek
- licensed-data
- options
- opra
- us
- tick
description:
  purpose: Tick-level OPRA option trades, each row carrying the latest option NBBO, the latest top-of-book
    bid/ask from every options exchange (as semicolon lists) and a full set of underlying quote and last-trade
    fields.
  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. Contract
    identity per row = Ticker (option root/underlying, sample AAPL) + ExpirationDate + StrikePrice + CallPut;
    UnderSymbol repeats the underlying. No OSI/OCC symbol column exists; one could be built from these
    fields. StrikePrice (e.g. 192.5) and all option and underlying prices are plain decimals in dollars
    per share, not scaled by 1000; the contract multiplier is not in the file. EventType decoding verified
    on the sample: 33 = 32 call + 1 Trade; 1 = put Trade; NBBO bit is clear on trade rows and Side is
    blank. Bit 4 (16) would mark a cancelled prior trade; no cancel rows appear in the sample, but cancel
    conditions A, C, E, G exist in Conditions. LastNBBO* fields give the best bid/ask (with posting exchange)
    before the trade; List* fields give each exchange''s own last bid/ask. In the sample the NBBO bid
    price always equals the List price at its exchange (100 of 100).'
  authoritativeDefinitions:
  - type: businessDefinition
    url: https://algoseek.com/dataset/us-options-trade-and-top-of-book-quote/
  - type: implementation
    url: https://algoseek.com/data-docs/options-market-data/algoseek.US.Options.TTOB.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_TTOB}/
  format: csv
  encoding: UTF-8
  customProperties:
  - property: layout
    value: 'Plain-text CSV with a fixed header, trade events ordered by time. Guide: one file per option
      contract per trading day, with the example of all AAPL calls and puts for one expiration on one
      trading date consolidated in one file; each CSV gzip-compressed (about 7x expansion). No bucket/path/file-name
      pattern is given. Sample rows span many strikes and both calls and puts of one AAPL expiration,
      i.e. chain-level.'
  - 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_trade_and_top_of_book_quote
  physicalName: opt_ttob
  physicalType: file
  logicalType: object
  businessName: US Options Trade and Top of Book Quote
  description: Tick-level OPRA option trades, each row carrying the latest option NBBO, the latest top-of-book
    bid/ask from every options exchange (as semicolon lists) and a full set of underlying quote and last-trade
    fields.
  dataGranularityDescription: one executed option trade with the last NBBO, per-exchange top-of-book quotes
    and underlying snapshot
  properties:
  - name: Date
    logicalType: date
    logicalTypeOptions:
      format: yyyymmdd
    physicalType: string (yyyymmdd) (csv text)
    description: Trading date of the event in yyyymmdd; the guide marks the column as optional.
    primaryKey: true
    primaryKeyPosition: 1
    required: true
    partitioned: true
    partitionKeyPosition: 1
    customProperties:
    - property: nullMeaning
      value: unstated (guide marks column optional)
    - property: evidence
      value: guide+sample
  - name: Timestamp
    logicalType: time
    logicalTypeOptions:
      format: HHMMSSmmm
    physicalType: string (HHMMSSmmm) (csv text)
    description: Event time in US Eastern clock time to the millisecond, no date part; keep as text (Excel
      mangles it).
    primaryKey: true
    primaryKeyPosition: 2
    required: true
    customProperties:
    - property: evidence
      value: guide+sample
  - name: Ticker
    logicalType: string
    physicalType: string (csv text)
    description: 'Symbol of the option''s underlying/root (sample: AAPL). Guide calls it ''Symbol name''.'
    primaryKey: true
    primaryKeyPosition: 3
    required: true
    partitioned: true
    partitionKeyPosition: 2
    customProperties:
    - property: evidence
      value: guide+sample
  - name: CallPut
    logicalType: string
    logicalTypeOptions:
      format: C | P
    physicalType: string (csv text)
    description: 'Option type: C for call, P for put.'
    primaryKey: true
    primaryKeyPosition: 4
    required: true
    enum:
    - value: C
      label: Call
    - value: P
      label: Put
    customProperties:
    - property: evidence
      value: guide+sample
  - name: StrikePrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Strike price of the contract in dollars (index points for index options), e.g. 4555 or
      202.5.
    primaryKey: true
    primaryKeyPosition: 5
    required: true
    customProperties:
    - property: unit
      value: USD
    - property: evidence
      value: guide+sample
  - name: ExpirationDate
    logicalType: date
    logicalTypeOptions:
      format: yyyymmdd
    physicalType: string (yyyymmdd) (csv text)
    description: Expiration date of the option contract in yyyymmdd.
    primaryKey: true
    primaryKeyPosition: 6
    required: true
    customProperties:
    - property: evidence
      value: guide+sample
  - name: EventType
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: string (csv text)
    description: 'Numeric byte mask: bits 0-3 message type, bit 4 cancel, bit 5 call, bit 6 NBBO, bit
      7 buy/bid side. Action is its text form.'
    primaryKey: true
    primaryKeyPosition: 7
    required: true
    customProperties:
    - property: evidence
      value: guide+sample
  - name: Action
    logicalType: string
    logicalTypeOptions:
      format: space-separated tokens, e.g. 'T'
    physicalType: string (csv text)
    description: 'Text form of EventType: message-type token plus NB when the NBBO bit is set (e.g. ''FQ
      NB''). Side is a separate column.'
    enum:
    - value: H
      label: Halted
    - value: HB
      label: Heartbeat
    - value: I
      label: Indicative Value
    - value: IN
      label: Invalid
    - value: OI
      label: OpenInterest
    - value: R
      label: Rotation
    - value: T
      label: Trade
    - value: TI
      label: TradeInterest
    - value: UQ
      label: UnderlyingValueQuote
    - value: US
      label: UnderlyingValueSale
    - value: NB
      label: NBBO (shown as '* NB' suffix)
    customProperties:
    - property: evidence
      value: guide+sample
  - name: Side
    logicalType: string
    logicalTypeOptions:
      format: B | A | blank
    physicalType: string (csv text)
    description: 'Side of the book for quote events: B bid, A ask. Blank for trade events.'
    enum:
    - value: B
      label: Bid side of the book
    - value: A
      label: Ask side of the book
    customProperties:
    - property: nullMeaning
      value: Empty for trade events (guide)
    - property: evidence
      value: guide+sample
  - name: Price
    logicalType: number
    physicalType: decimal (csv text)
    description: Trade price for trades; bid or ask price (per Side) for quote events. Option premium
      per underlying unit.
    primaryKey: true
    primaryKeyPosition: 9
    required: true
    customProperties:
    - property: unit
      value: USD
    - property: evidence
      value: guide+sample
  - name: Quantity
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: 'Event size: traded size for trades, quote size for quotes. Guide says ''underlying asset
      quantity''; values behave as contract counts.'
    primaryKey: true
    primaryKeyPosition: 10
    required: true
    customProperties:
    - property: unit
      value: contracts
    - property: evidence
      value: guide+sample
  - name: Exchange
    logicalType: string
    logicalTypeOptions:
      format: 2-letter code
    physicalType: string (csv text)
    description: Two-letter code of the options venue that reported the trade or posted the quote (guide
      Table 2).
    primaryKey: true
    primaryKeyPosition: 8
    required: true
    enum:
    - value: AM
      label: AMEX
    - value: AR
      label: ARCA
    - value: BA
      label: BATS
    - value: BY
      label: BATS_Y
    - value: BO
      label: BOSTON
    - value: C2
      label: C2
    - value: CB
      label: CBOE
    - value: CS
      label: CSE
    - value: EA
      label: EDGA
    - value: EX
      label: EDGX
    - value: FI
      label: FINRA
    - value: IE
      label: IEX OPTIONS
    - value: IS
      label: ISE
    - value: IG
      label: ISE_GEMINI
    - value: IM
      label: ISE_MERCURY
    - value: LT
      label: LTSE
    - value: MI
      label: MIAX
    - value: MP
      label: MIAX_PEARL
    - value: ME
      label: MIAX_EMERALD
    - value: MS
      label: MIAX_SAPPHIRE
    - value: MX
      label: MEMX
    - value: M2
      label: MX2 OPTIONS
    - value: NA
      label: NASDAQ
    - value: NB
      label: NASDAQ_BX
    - value: NP
      label: NASDAQ_PSX
    - value: NS
      label: NSE
    - value: NY
      label: NYSE
    - value: OP
      label: OPRA
    - value: SI
      label: SIAC
    - value: TH
      label: THOMSON
    - value: UN
      label: UNKNOWN
    customProperties:
    - property: evidence
      value: guide+sample
  - name: Conditions
    logicalType: string
    logicalTypeOptions:
      format: single character (space is a valid value)
    physicalType: string (csv text)
    description: Single-character trade condition (guide Table 4); sample shows I, f, g, S, j, a.
    enum:
    - value: ' '
      label: 'SPACE: Regular sale, no stated conditions'
    - value: A
      label: 'CANC: Cancel of an earlier report (not the first or last of the day)'
    - value: B
      label: 'OSEQ: Late report, out of sequence'
    - value: C
      label: 'CNCL: Cancel of the last reported transaction'
    - value: D
      label: 'LATE: Late report, in correct sequence'
    - value: E
      label: 'CNCO: Cancel of the opening report although later trades exist'
    - value: F
      label: 'OPEN: Late report of the opening trade, out of sequence'
    - value: G
      label: 'CNOL: Cancel of the only report of the day for the contract'
    - value: H
      label: 'OPNL: Late report of the opening trade, in correct sequence'
    - value: I
      label: 'AUTO: Executed electronically; informational, treat as regular'
    - value: J
      label: 'REOP: Reopening after a halt; informational, treat as regular'
    - value: S
      label: 'ISOI: Intermarket Sweep Order execution; treat as normal'
    - value: a
      label: 'SLAN: Single-leg auction, non-ISO'
    - value: b
      label: 'SLAI: Single-leg auction, ISO'
    - value: c
      label: 'SLCN: Single-leg cross, non-ISO'
    - value: d
      label: 'SCLI: Single-leg cross, ISO'
    - value: e
      label: 'SLFT: Single-leg floor trade'
    - value: f
      label: 'MLET: Multi-leg electronic trade in complex book'
    - value: g
      label: 'MLAT: Multi-leg auction in complex book'
    - value: h
      label: 'MLCT: Multi-leg cross'
    - value: i
      label: 'MLFT: Multi-leg floor trade against other multi-leg orders'
    - value: j
      label: 'MESL: Multi-leg electronic trade against single-leg orders/quotes'
    - value: k
      label: 'TLAT: Stock/options multi-leg auction in complex book'
    - value: l
      label: 'MASL: Multi-leg auction against single-leg orders/quotes'
    - value: m
      label: 'MFSL: Multi-leg floor trade against single-leg orders/quotes'
    - value: n
      label: 'TLET: Stock/options multi-leg electronic trade'
    - value: o
      label: 'TLCT: Stock/options multi-leg cross'
    - value: p
      label: 'TLFT: Stock/options multi-leg floor trade'
    - value: q
      label: 'TESL: Stock/options electronic trade against single-leg orders/quotes'
    - value: r
      label: 'TASL: Stock/options auction against single-leg orders/quotes'
    - value: s
      label: 'TFSL: Stock/options floor trade against single-leg orders/quotes'
    - value: t
      label: 'CBMO: Multi-leg floor trade (3+ legs) in proprietary product; price may be outside NBBO'
    - value: u
      label: 'MCTP: Multilateral compression trade in proprietary product; does not update OHLC'
    - value: v
      label: 'EXHT: Extended-hours trade; does not update OHLC'
    customProperties:
    - property: evidence
      value: guide+sample
  - name: LastNBBOBidTime
    logicalType: time
    logicalTypeOptions:
      format: HHMMSSmmm
    physicalType: string (HHMMSSmmm) (csv text)
    description: Time of the last option NBBO bid before the trade (ET, ms).
    customProperties:
    - property: evidence
      value: guide+sample
  - name: LastNBBOBidExchange
    logicalType: string
    logicalTypeOptions:
      format: 2-letter code
    physicalType: string (csv text)
    description: Exchange code posting the last option NBBO bid.
    enum:
    - value: AM
      label: AMEX
    - value: AR
      label: ARCA
    - value: BA
      label: BATS
    - value: BY
      label: BATS_Y
    - value: BO
      label: BOSTON
    - value: C2
      label: C2
    - value: CB
      label: CBOE
    - value: CS
      label: CSE
    - value: EA
      label: EDGA
    - value: EX
      label: EDGX
    - value: FI
      label: FINRA
    - value: IE
      label: IEX OPTIONS
    - value: IS
      label: ISE
    - value: IG
      label: ISE_GEMINI
    - value: IM
      label: ISE_MERCURY
    - value: LT
      label: LTSE
    - value: MI
      label: MIAX
    - value: MP
      label: MIAX_PEARL
    - value: ME
      label: MIAX_EMERALD
    - value: MS
      label: MIAX_SAPPHIRE
    - value: MX
      label: MEMX
    - value: M2
      label: MX2 OPTIONS
    - value: NA
      label: NASDAQ
    - value: NB
      label: NASDAQ_BX
    - value: NP
      label: NASDAQ_PSX
    - value: NS
      label: NSE
    - value: NY
      label: NYSE
    - value: OP
      label: OPRA
    - value: SI
      label: SIAC
    - value: TH
      label: THOMSON
    - value: UN
      label: UNKNOWN
    customProperties:
    - property: evidence
      value: guide+sample
  - name: LastNBBOBidPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Price of the last option NBBO bid.
    customProperties:
    - property: unit
      value: USD
    - property: evidence
      value: guide+sample
  - name: LastNBBOBidSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Size of the last option NBBO bid.
    customProperties:
    - property: unit
      value: contracts
    - property: evidence
      value: guide+sample
  - name: LastNBBOBidCondition
    logicalType: string
    logicalTypeOptions:
      format: single character (space is valid)
    physicalType: string (csv text)
    description: Condition of the last option NBBO bid (quote conditions, guide Table 5).
    enum:
    - value: ' '
      label: Regular trading
    - value: F
      label: Non-firm quote
    - value: I
      label: Indicative value
    - value: R
      label: Rotation
    - value: T
      label: Trading halted
    - value: A
      label: Eligible for automatic execution
    - value: B
      label: Bid contains customer trading interest
    - value: O
      label: Offer contains customer trading interest
    - value: C
      label: Both bid and offer contain customer trading interest
    - value: X
      label: Offer side not firm; bid side firm
    - value: Y
      label: Bid side not firm; offer side firm
    customProperties:
    - property: evidence
      value: guide+sample
  - name: LastNBBOAskTime
    logicalType: time
    logicalTypeOptions:
      format: HHMMSSmmm
    physicalType: string (HHMMSSmmm) (csv text)
    description: Time of the last option NBBO ask before the trade (ET, ms).
    customProperties:
    - property: evidence
      value: guide+sample
  - name: LastNBBOAskExchange
    logicalType: string
    logicalTypeOptions:
      format: 2-letter code
    physicalType: string (csv text)
    description: Exchange code posting the last option NBBO ask.
    enum:
    - value: AM
      label: AMEX
    - value: AR
      label: ARCA
    - value: BA
      label: BATS
    - value: BY
      label: BATS_Y
    - value: BO
      label: BOSTON
    - value: C2
      label: C2
    - value: CB
      label: CBOE
    - value: CS
      label: CSE
    - value: EA
      label: EDGA
    - value: EX
      label: EDGX
    - value: FI
      label: FINRA
    - value: IE
      label: IEX OPTIONS
    - value: IS
      label: ISE
    - value: IG
      label: ISE_GEMINI
    - value: IM
      label: ISE_MERCURY
    - value: LT
      label: LTSE
    - value: MI
      label: MIAX
    - value: MP
      label: MIAX_PEARL
    - value: ME
      label: MIAX_EMERALD
    - value: MS
      label: MIAX_SAPPHIRE
    - value: MX
      label: MEMX
    - value: M2
      label: MX2 OPTIONS
    - value: NA
      label: NASDAQ
    - value: NB
      label: NASDAQ_BX
    - value: NP
      label: NASDAQ_PSX
    - value: NS
      label: NSE
    - value: NY
      label: NYSE
    - value: OP
      label: OPRA
    - value: SI
      label: SIAC
    - value: TH
      label: THOMSON
    - value: UN
      label: UNKNOWN
    customProperties:
    - property: evidence
      value: guide+sample
  - name: LastNBBOAskPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Price of the last option NBBO ask.
    customProperties:
    - property: unit
      value: USD
    - property: evidence
      value: guide+sample
  - name: LastNBBOAskSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Size of the last option NBBO ask.
    customProperties:
    - property: unit
      value: contracts
    - property: evidence
      value: guide+sample
  - name: LastNBBOAskCondition
    logicalType: string
    logicalTypeOptions:
      format: single character (space is valid)
    physicalType: string (csv text)
    description: Condition of the last option NBBO ask (quote conditions, guide Table 5).
    enum:
    - value: ' '
      label: Regular trading
    - value: F
      label: Non-firm quote
    - value: I
      label: Indicative value
    - value: R
      label: Rotation
    - value: T
      label: Trading halted
    - value: A
      label: Eligible for automatic execution
    - value: B
      label: Bid contains customer trading interest
    - value: O
      label: Offer contains customer trading interest
    - value: C
      label: Both bid and offer contain customer trading interest
    - value: X
      label: Offer side not firm; bid side firm
    - value: Y
      label: Bid side not firm; offer side firm
    customProperties:
    - property: evidence
      value: guide+sample
  - name: ListQuoteExchange
    logicalType: string
    logicalTypeOptions:
      format: semicolon-separated exchange codes; element order varies by row (15 or 16 elements in sample)
    physicalType: string (csv text)
    description: Exchanges whose top-of-book quote is listed; every other List* column is aligned to this
      order.
    customProperties:
    - property: evidence
      value: guide+sample
  - name: ListLastBidTime
    logicalType: string
    logicalTypeOptions:
      format: semicolon-separated list aligned to ListQuoteExchange
    physicalType: string (csv text)
    description: Last bid time per exchange in ListQuoteExchange order (HHMMSSmmm each).
    customProperties:
    - property: evidence
      value: guide+sample
  - name: ListLastBidPrice
    logicalType: string
    logicalTypeOptions:
      format: semicolon-separated list aligned to ListQuoteExchange
    physicalType: string (csv text)
    description: Last bid price per exchange in ListQuoteExchange order.
    customProperties:
    - property: evidence
      value: guide+sample
  - name: ListLastBidSize
    logicalType: string
    logicalTypeOptions:
      format: semicolon-separated list aligned to ListQuoteExchange
    physicalType: string (csv text)
    description: Last bid size per exchange in ListQuoteExchange order.
    customProperties:
    - property: evidence
      value: guide+sample
  - name: ListLastAskTime
    logicalType: string
    logicalTypeOptions:
      format: semicolon-separated list aligned to ListQuoteExchange
    physicalType: string (csv text)
    description: Last ask time per exchange in ListQuoteExchange order (HHMMSSmmm each).
    customProperties:
    - property: evidence
      value: guide+sample
  - name: ListLastAskPrice
    logicalType: string
    logicalTypeOptions:
      format: semicolon-separated list aligned to ListQuoteExchange
    physicalType: string (csv text)
    description: Last ask price per exchange in ListQuoteExchange order.
    customProperties:
    - property: evidence
      value: guide+sample
  - name: ListLastAskSize
    logicalType: string
    logicalTypeOptions:
      format: semicolon-separated list aligned to ListQuoteExchange
    physicalType: string (csv text)
    description: Last ask size per exchange in ListQuoteExchange order.
    customProperties:
    - property: evidence
      value: guide+sample
  - name: ListLastQuoteCondition
    logicalType: string
    logicalTypeOptions:
      format: semicolon-separated single characters aligned to ListQuoteExchange
    physicalType: string (csv text)
    description: Last quote condition per exchange in ListQuoteExchange order; a space is a valid element.
      Equals the bid list in all sample rows.
    customProperties:
    - property: evidence
      value: guide+sample
  - name: ListLastBidCondition
    logicalType: string
    logicalTypeOptions:
      format: semicolon-separated single characters aligned to ListQuoteExchange
    physicalType: string (csv text)
    description: Last bid condition per exchange in ListQuoteExchange order; a space is a valid element.
    customProperties:
    - property: evidence
      value: guide+sample
  - name: ListLastAskCondition
    logicalType: string
    logicalTypeOptions:
      format: semicolon-separated single characters aligned to ListQuoteExchange
    physicalType: string (csv text)
    description: Last ask condition per exchange in ListQuoteExchange order; a space is a valid element.
    customProperties:
    - property: evidence
      value: guide+sample
  - name: UnderSymbol
    logicalType: string
    physicalType: string (csv text)
    description: 'Underlying symbol name (sample: AAPL).'
    customProperties:
    - property: evidence
      value: guide+sample
  - name: UnderBidTime
    logicalType: time
    logicalTypeOptions:
      format: HHMMSSmmmuuunnn (15 digits, ns)
    physicalType: string (HHMMSSmmmuuunnn) (csv text)
    description: Time of the underlying's bid quote (ET, ns resolution).
    customProperties:
    - property: evidence
      value: guide+sample
  - name: UnderBidPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Bid price of the underlying security.
    customProperties:
    - property: unit
      value: USD
    - property: evidence
      value: guide+sample
  - name: UnderBidSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Bid size of the underlying (shares inferred from values 100-600).
    customProperties:
    - property: unit
      value: shares
    - property: evidence
      value: guide+sample
  - name: UnderBidConditions
    logicalType: string
    logicalTypeOptions:
      format: 8-character hex-like mask (e.g. 00000001); format evident in sample only
    physicalType: string (csv text)
    description: Condition flags of the underlying's bid quote. Guide gives no code table.
    customProperties:
    - property: evidence
      value: guide+sample
  - name: UnderBidExchange
    logicalType: string
    logicalTypeOptions:
      format: single letter
    physicalType: string (csv text)
    description: 'Exchange of the underlying''s bid; single-letter equity venue code (sample: Z, Q, X,
      P, U). Guide Table 2 does not cover these.'
    customProperties:
    - property: evidence
      value: guide+sample
  - name: UnderAskTime
    logicalType: time
    logicalTypeOptions:
      format: HHMMSSmmmuuunnn (15 digits, ns)
    physicalType: string (HHMMSSmmmuuunnn) (csv text)
    description: Time of the underlying's ask quote (ET, ns resolution).
    customProperties:
    - property: evidence
      value: guide+sample
  - name: UnderAskPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Ask price of the underlying security.
    customProperties:
    - property: unit
      value: USD
    - property: evidence
      value: guide+sample
  - name: UnderAskSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Ask size of the underlying (shares inferred).
    customProperties:
    - property: unit
      value: shares
    - property: evidence
      value: guide+sample
  - name: UnderAskConditions
    logicalType: string
    logicalTypeOptions:
      format: 8-character hex-like mask (e.g. 00000001); format evident in sample only
    physicalType: string (csv text)
    description: Condition flags of the underlying's ask quote. Guide gives no code table.
    customProperties:
    - property: evidence
      value: guide+sample
  - name: UnderAskExchange
    logicalType: string
    logicalTypeOptions:
      format: single letter
    physicalType: string (csv text)
    description: 'Exchange of the underlying''s ask; single-letter equity venue code (sample: P, Q, V,
      N). Not defined in the guide.'
    customProperties:
    - property: evidence
      value: guide+sample
  - name: UnderLastTradeTime
    logicalType: time
    logicalTypeOptions:
      format: HHMMSSmmmuuunnn (15 digits, ns)
    physicalType: string (HHMMSSmmmuuunnn) (csv text)
    description: Time of the underlying's last trade before this trade, ns resolution (ET).
    customProperties:
    - property: nullMeaning
      value: Blank (empty if no trade price is available)
    - property: evidence
      value: guide+sample
  - name: UnderLastTradePrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Price of the underlying's last trade before this trade.
    customProperties:
    - property: unit
      value: USD
    - property: nullMeaning
      value: Blank (empty if no trade price is available)
    - property: evidence
      value: guide+sample
  - name: UnderLastTradeSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: decimal (csv text)
    description: Size of the underlying's last trade before this trade; guide types it decimal but sample
      values are whole numbers.
    customProperties:
    - property: unit
      value: shares
    - property: nullMeaning
      value: Blank (empty if no trade price is available)
    - property: evidence
      value: guide+sample
  - name: UnderLastTradeConditions
    logicalType: string
    logicalTypeOptions:
      format: 8-character hex-like mask (e.g. 80000001)
    physicalType: string (csv text)
    description: Condition flags of the underlying's last trade. Guide gives no code table.
    customProperties:
    - property: nullMeaning
      value: Blank (empty if no trade price is available)
    - property: evidence
      value: guide+sample
  - name: UnderLastTradeExchange
    logicalType: string
    logicalTypeOptions:
      format: single letter
    physicalType: string (csv text)
    description: 'Exchange of the underlying''s last trade; single-letter venue code (sample: D, Z, P,
      V, J, Y). Not defined in the guide.'
    customProperties:
    - property: nullMeaning
      value: Blank (empty if no trade price is available)
    - property: evidence
      value: guide+sample
  - name: UnderTotalTradeSize
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: 'Guide: total trade size of the last trade; sample values rise steadily with time, i.e.
      a cumulative running volume of the underlying.'
    customProperties:
    - property: unit
      value: shares
    - property: nullMeaning
      value: Blank (empty if no trade price is available)
    - property: evidence
      value: guide+sample
  - name: UnderTotalTradeCount
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: 'Guide: total trade count of the last trade; sample values rise steadily with time, i.e.
      a cumulative running trade count of the underlying.'
    customProperties:
    - property: unit
      value: count
    - property: nullMeaning
      value: Blank (empty if no trade price is available)
    - 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
      - Timestamp
      - Ticker
      - CallPut
      - StrikePrice
      - ExpirationDate
      - EventType
      - Exchange
      - Price
      - Quantity
    dimension: uniqueness
    severity: warning
    description: 'Best-effort key for an event stream: same-timestamp events from one venue can repeat,
      so duplicates are reported, not rejected.'
  - id: LastNBBOAskSize_non_negative
    type: sql
    description: LastNBBOAskSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE LastNBBOAskSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: LastNBBOBidSize_non_negative
    type: sql
    description: LastNBBOBidSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE LastNBBOBidSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: Quantity_non_negative
    type: sql
    description: Quantity is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE Quantity < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: UnderAskSize_non_negative
    type: sql
    description: UnderAskSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE UnderAskSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: UnderBidSize_non_negative
    type: sql
    description: UnderBidSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE UnderBidSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: UnderLastTradeSize_non_negative
    type: sql
    description: UnderLastTradeSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE UnderLastTradeSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: UnderTotalTradeCount_non_negative
    type: sql
    description: UnderTotalTradeCount is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE UnderTotalTradeCount < 0
    mustBe: 0
    dimension: accuracy
    severity: error
  - id: UnderTotalTradeSize_non_negative
    type: sql
    description: UnderTotalTradeSize is never negative.
    query: SELECT COUNT(*) FROM {object} WHERE UnderTotalTradeSize < 0
    mustBe: 0
    dimension: accuracy
    severity: error
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: update_frequency
  property: frequency
  value: 1
  unit: d
  driver: analytics
- 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_ttob
- property: vendorSampleUrl
  value: https://as-metadata-services-assets.s3.amazonaws.com/sample_data/cloud_storage/opt_ttob_v2.csv
- property: assetClass
  value: option
- property: venues
  value:
  - AM (AMEX)
  - AR (ARCA)
  - BA (BATS)
  - BY (BATS_Y)
  - BO (BOSTON)
  - C2 (C2)
  - CB (CBOE)
  - CS (CSE)
  - EA (EDGA)
  - EX (EDGX)
  - FI (FINRA)
  - IE (IEX OPTIONS)
  - IS (ISE)
  - IG (ISE_GEMINI)
  - IM (ISE_MERCURY)
  - LT (LTSE)
  - MI (MIAX)
  - MP (MIAX_PEARL)
  - ME (MIAX_EMERALD)
  - MS (MIAX_SAPPHIRE)
  - MX (MEMX)
  - M2 (MX2 OPTIONS)
  - NA (NASDAQ)
  - NB (NASDAQ_BX)
  - NP (NASDAQ_PSX)
  - NS (NSE)
  - NY (NYSE)
  - OP (OPRA)
  - SI (SIAC)
  - TH (THOMSON)
  - UN (UNKNOWN)
- property: coverage
  value: Trades and top-of-book quotes from the 16 SEC-approved options exchanges via OPRA for options
    on equities, ETFs, ETNs and ADRs (guide); the product page says all listed US options contracts disseminated
    via OPRA. Start date not stated.
- property: timezone
  value: America/New_York
- property: timestampFormat
  value: Option times HHMMSSmmm (ms, text); underlying times HHMMSSmmmuuunnn (15 digits, ns resolution);
    no date component
- property: sessionHours
  value: 09:30:00-16:15:00 ET
- property: priceAdjustment
  value: n/a
- property: licensedData
  value: true
- property: evidenceGrade
  value: vendor-doc
- property: knownIssues
  value:
  - Primary key is inferred; AlgoSeek's guide does not name one.
  - 'Doc discrepancy: Guide field table orders EventType, Side, Action; the sample header orders EventType,
    Action, Side.'
  - 'Doc discrepancy: Guide Table 1 intro says the table is for the ''Options Trade Only data file'' (copy-paste
    from the Trade Only guide).'
  - 'Doc discrepancy: Guide types EventType as ''string''; sample values are decimal integers rendered
    as text (1, 33).'
  - 'Doc discrepancy: Guide types UnderLastTradeSize as ''decimal''; every sample value is a whole number.'
  - 'Doc discrepancy: Guide describes UnderTotalTradeSize and UnderTotalTradeCount as the size and count
    of the last trade; sample values grow monotonically with time (609460 to 645508; 3616 to 4122), so
    they behave as cumulative running totals for the underlying.'
  - 'Doc discrepancy: Guide gives no code tables for UnderBidConditions, UnderAskConditions, UnderLastTradeConditions
    (sample: 8-character values like 00000001, 80000001, A0000201) or for the single-letter Under*Exchange
    codes (sample: Z, Q, X, P, U, V, N, D, J, Y); Table 2 covers options exchanges only.'
  - 'Doc discrepancy: Number of elements in the List* columns varies by row (16 in 81 rows, 15 in 19 rows;
    AR is absent from the shorter lists) and exchange order differs from row to row.'
  - 'Doc discrepancy: ListLastQuoteCondition equals ListLastBidCondition in all 100 sample rows and ListLastAskCondition
    in 99; the guide does not explain how it differs.'
  - 'Doc discrepancy: Guide intro says top-of-book quotes and all trades, but the sample (and page) contain
    only trade rows (Action ''T''); quote events are not rows.'
  - 'Doc discrepancy: Product page says coverage includes all listed US options contracts; the guide scopes
    it to options on equities, ETFs, ETNs and ADRs.'
  - 'Doc discrepancy: Guide Table 3 (Action) adds HB = Heartbeat that does not appear in the other options
    guides; Table 7 still lists Heartbeat as not in use.'
  - 'Doc discrepancy: Guide intro says 16 options exchanges, but Table 2 lists 31 codes including FINRA,
    OPRA, SIAC, THOMSON and UNKNOWN.'
  - 'Doc discrepancy: Guide Table 6 says bits 0-3 are a ''3-bit'' message type, but bits 0-3 are 4 bits
    and Table 7 runs to value 11.'
  - 'Doc discrepancy: Guide Table 7 names message type 10 ''UnderlyingValueSell'' while Table 3 names
    the matching action ''UnderlyingValueSale''.'
  - 'Doc discrepancy: Guide Table 7 has no type 12 (Indicative); Table 3 lists action ''I'' = Indicative
    Value and ''IN'' = Invalid with no message-type value. The AlgoSeek decoder convention assigns 12
    = Indicative.'
  - 'Doc discrepancy: Guide describes Quantity as ''Underlying asset quantity''; sample values (1..3444,
    quote sizes) behave as option contract counts.'
  - 'Doc discrepancy: Guide expands OPRA as ''Options Pricing Authority'' while the product pages say
    ''Options Price Reporting Authority''.'
contractCreatedTs: '2026-11-02T00:00:00Z'
