# 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-equities-trade-only-adjusted-minute-bar-excluding-finra-trf-trades
name: AlgoSeek US Equities Trade Only Adjusted Minute Bar Excluding FINRA/TRF Trades
version: 0.1.0
status: draft
domain: market-data
tags:
- algoseek
- licensed-data
- equity
- us
- bar
description:
  purpose: One row is a one-minute trade-only bar for one US-listed equity (ASID) built from exchange
    trades only (FINRA/TRF reports and odd lots excluded), with prices already adjusted for corporate
    events and the adjustment factors supplied alongside. Delivered as an ArdaDB database table.
  usage: Backtesting, execution and microstructure research, feature engineering for US equities.
  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. Price
    columns are NOT raw: divide by PriceAdjFactor to approximate as-traded prices (inference; the factor''s
    convention is undocumented). Cross-dataset check: the industry-standard adjusted sample for the same
    AAPL day shows an adjusted/raw ratio of about 0.998651, the same value as PriceAdjFactor here. Whether
    Volume is raw or adjusted cannot be determined: VolumeAdjFactor is 1 for every sample row, and Volume
    equals the unadjusted bar''s volume. For reference, AlgoSeek''s Daily Cumulative Adjustment Factors
    guide multiplies price by its cumulative price factor and divides volume by its cumulative volume
    factor; whether this table follows that is unconfirmed. The adjustment is a single factor for the
    whole day (0.998651458110918 for all 100 rows), consistent with a per-trade-date cumulative backward
    factor. Restatement behavior (rebuild on new corporate events) is documented for the sibling adjusted
    datasets, not for this one.'
  authoritativeDefinitions:
  - type: businessDefinition
    url: https://algoseek.com/dataset/us-equities-trade-only-adjusted-minute-bar-excluding-finra-trf-trades/
  - type: implementation
    url: https://algoseek.com/data-docs/equity-market-data/algoseek.US.EquityTrades.Only.Minute.Bars.pdf
context:
  instructions: Times are local US Eastern clock times (DST-aware), not UTC. Treat TRADE NB / NBBO-flagged
    rows as the backtest-grade subset. Cancellations reference earlier trades and can arrive hours later,
    so aggregate only after the session closes. Prices are unadjusted unless the dataset name says Adjusted;
    join us-equities-*-adjustment-factors on SecId for adjustment.
  verifiedStatements:
  - id: vs1
    question: What time zone are the timestamps in?
    answer: US Eastern local time with daylight saving (the guides label it EST/ET).
  - id: vs2
    question: Are prices adjusted for splits and dividends?
    answer: Only in datasets whose name contains Adjusted; all others are as traded.
  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_EQ_TRADES_1MIN_NOFINRA_ADJ}/
  format: csv
  encoding: UTF-8
  customProperties:
  - property: layout
    value: 'Page says only: files are sorted by date and ticker, and alternative file organization is
      available on request. The published sample comes from the ArdaDB database_table channel rather than
      an S3 CSV bucket; no bucket, path, compression or per-file grain is documented for this product.'
  - 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_equities_trade_only_adjusted_minute_bar_excluding_finra_trf_trades
  physicalName: eq_trades_1min_nofinra_adj
  physicalType: file
  logicalType: object
  businessName: US Equities Trade Only Adjusted Minute Bar Excluding FINRA/TRF Trades
  description: One row is a one-minute trade-only bar for one US-listed equity (ASID) built from exchange
    trades only (FINRA/TRF reports and odd lots excluded), with prices already adjusted for corporate
    events and the adjustment factors supplied alongside. Delivered as an ArdaDB database table.
  dataGranularityDescription: one ASID (ticker) x one minute (BarDateTime) that had at least one qualifying
    on-exchange trade
  properties:
  - name: TradeDate
    logicalType: date
    logicalTypeOptions:
      format: yyyy-mm-dd
    physicalType: string (csv text)
    description: Trading date of the bar. Plays the role of Date in the other trade-only bar datasets
      but uses ISO date format.
    customProperties:
    - property: evidence
      value: sample-only
  - name: BarDateTime
    logicalType: timestamp
    logicalTypeOptions:
      timezone: true
      defaultTimezone: America/New_York
      format: yyyy-mm-dd HH:MM:SS
    physicalType: string (csv text)
    description: 'Bar start as a date-time with whole-second precision and no time-zone offset (ET inferred:
      first regular bar is 09:30:00).'
    primaryKey: true
    primaryKeyPosition: 2
    required: true
    partitioned: true
    partitionKeyPosition: 1
    customProperties:
    - property: evidence
      value: sample-only
  - name: Ticker
    logicalType: string
    physicalType: string (csv text)
    description: Symbol name (ticker) of the security the bar belongs to.
    customProperties:
    - property: evidence
      value: guide+sample
  - name: ASID
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: 'AlgoSeek Security ID: unique per security and unchanged across its whole life (defined
      in the ASID Lookup / Security Master guides).'
    primaryKey: true
    primaryKeyPosition: 1
    required: true
    partitioned: true
    partitionKeyPosition: 2
    customProperties:
    - property: evidence
      value: sample-only
  - name: FirstTradePrice
    logicalType: number
    physicalType: decimal (csv text)
    description: First-trade price in the bar. Sample values equal the unadjusted ex-FINRA price x PriceAdjFactor,
      i.e. already adjusted.
    customProperties:
    - property: unit
      value: USD
    - property: evidence
      value: guide+sample
  - name: HighTradePrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Highest trade price in the bar; sample values are already adjusted (unadjusted price
      x PriceAdjFactor).
    customProperties:
    - property: unit
      value: USD
    - property: evidence
      value: guide+sample
  - name: LowTradePrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Lowest trade price in the bar; sample values are already adjusted (unadjusted price x
      PriceAdjFactor).
    customProperties:
    - property: unit
      value: USD
    - property: evidence
      value: guide+sample
  - name: LastTradePrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Last-trade price in the bar; sample values are already adjusted (unadjusted price x PriceAdjFactor).
    customProperties:
    - property: unit
      value: USD
    - property: evidence
      value: guide+sample
  - name: VolumeWeightPrice
    logicalType: number
    physicalType: decimal (csv text)
    description: Volume-weighted average trade price of the bar; sample values are already adjusted (unadjusted
      VWAP x PriceAdjFactor).
    customProperties:
    - property: unit
      value: USD
    - property: evidence
      value: guide+sample
  - name: Volume
    logicalType: integer
    logicalTypeOptions:
      format: i64
    physicalType: integer (csv text)
    description: Total shares traded in the bar. Sample values equal the unadjusted ex-FINRA volume (VolumeAdjFactor
      is 1 in the sample).
    customProperties:
    - property: unit
      value: shares
    - 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: evidence
      value: guide+sample
  - name: PriceAdjFactor
    logicalType: number
    physicalType: decimal (csv text)
    description: 'Price adjustment factor: sample price columns equal the unadjusted ex-FINRA price times
      this factor. Not defined in any supplied guide.'
    customProperties:
    - property: evidence
      value: sample-only
  - name: VolumeAdjFactor
    logicalType: number
    physicalType: decimal (csv text)
    description: Volume adjustment factor, 1 in the sample so it cannot show whether Volume is raw or
      adjusted. Not defined in any supplied guide.
    customProperties:
    - property: evidence
      value: sample-only
  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:
      - ASID
      - BarDateTime
    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: open_close_within_range
    type: sql
    description: 'Open and close usually sit inside the high-low range. Only a warning: some AlgoSeek
      aggregations take open/close from a different event set than high/low (seen in the Daily OHLC sample).'
    query: SELECT COUNT(*) FROM {object} WHERE FirstTradePrice > HighTradePrice OR FirstTradePrice < LowTradePrice
      OR LastTradePrice > HighTradePrice OR LastTradePrice < LowTradePrice
    mustBe: 0
    dimension: accuracy
    severity: warning
  - 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: 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
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
- property: vendorDatasetTextId
  value: eq_trades_1min_nofinra_adj
- property: vendorSampleUrl
  value: https://as-metadata-services-assets.s3.amazonaws.com/sample_files/database_table/eq_trades_1min_nofinra_adj.csv
- property: assetClass
  value: equity
- property: venues
  value:
  - NASDAQ
  - BATS
  - NYSE
  - ARCA
- property: coverage
  value: US exchange-listed equities (common and preferred stock, ETFs, ETNs, ADRs, warrants, units) from
    the SIP, with FINRA/TRF reports excluded per the page's first paragraph and the sample's volumes.
    The page's second paragraph says the data includes off-exchange TRF trades (see discrepancies). History
    length is not stated.
- property: timezone
  value: America/New_York
- property: timestampFormat
  value: TradeDate yyyy-mm-dd; BarDateTime 'yyyy-mm-dd HH:MM:SS' (bar start, whole seconds, no offset)
- property: sessionHours
  value: 04:00-20:00 ET per the linked base guide (not restated for this product); the sample covers only
    09:30-11:09
- property: priceAdjustment
  value: adjusted for corporate events such as dividends and splits (page); direction not stated. Sample
    price columns = unadjusted price x PriceAdjFactor
- property: licensedData
  value: true
- property: evidenceGrade
  value: vendor-doc+sample
- property: knownIssues
  value:
  - Primary key is inferred; AlgoSeek's guide does not name one.
  - 'Doc discrepancy: Schema mismatch with the linked guide: the page links the 10-column base Minute
    Bar guide, but the sample has 13 columns. TradeDate (yyyy-mm-dd) and BarDateTime (timestamp) replace
    the guide''s Date (yyyymmdd) and TimeBarStart (HH:MM); ASID, PriceAdjFactor and VolumeAdjFactor appear
    in no supplied guide. Date and TimeBarStart were mapped to those columns rather than added as guide…'
  - 'Doc discrepancy: Page says the data ''follows the same format as'' the Trade Only Adjusted Minute
    Bar (17 columns: SecId, raw prices, *Adjusted columns), yet the sample has no SecId and no *Adjusted
    columns; it has one price set plus two factor columns.'
  - 'Doc discrepancy: Page says the dataset delivers raw OHLC/volume plus adjusted OHLC/volume, but the
    sample only has one set of price columns and they are already adjusted: for all 100 rows, price =
    unadjusted ex-FINRA sample price x PriceAdjFactor (max abs diff 5e-5, 4-decimal rounding).'
  - 'Doc discrepancy: Page description says both that off-exchange TRF trades are excluded and that the
    data includes ''off-exchange trades reported to TRF'' (second paragraph looks copied from the standard
    adjusted page). The sample''s Volume/TotalTrades match the ex-FINRA unadjusted bars (663,233 / 1,075
    at 09:30), not the standard bars (848,436 / 7,183).'
  - 'Doc discrepancy: Scraped bundle fields page_category and page_name hold description sentences (page
    has an extra description paragraph that shifted the scrape); the dataset name here is taken from the
    page heading.'
  - 'Doc discrepancy: Linked guide''s VolumeWeightPrice formula has the same spurious NBBOMidpoint term;
    see the base Minute Bar specs.'
  - 'Doc discrepancy: Sample comes from the ArdaDB database_table channel, unlike the other six datasets
    in this batch whose samples are S3 cloud_storage CSVs.'
contractCreatedTs: '2026-11-02T00:00:00Z'
