Skip to content

fix(mdds)!: default trade_quote exclusive to true, matching the terminal#1216

Open
userFRM wants to merge 1 commit into
mainfrom
fix/trade-quote-exclusive-default
Open

fix(mdds)!: default trade_quote exclusive to true, matching the terminal#1216
userFRM wants to merge 1 commit into
mainfrom
fix/trade-quote-exclusive-default

Conversation

@userFRM

@userFRM userFRM commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

The typed SDK's trade_quote endpoints diverged from the v3 terminal on the paired NBBO quote. The terminal injects exclusive=true when the value is omitted (pairing each trade with the last quote strictly before it), while the typed SDK builders defaulted exclusive to false. This flips the SDK default to true so an omitted value matches the terminal.

How it was found

A full endpoint-by-endpoint 1:1 comparison of the SDK against the v3 terminal on identical bounded queries. Of every comparable endpoint, option_history_trade_quote and stock_history_trade_quote were the only ones whose values diverged: the same trades, but a different paired quote (ask and sizes) on 44-70% of rows. Every other endpoint was byte-for-byte identical.

Verification

  • Fix confirmed live against the terminal: 0 of 10 quote rows differ, down from 7 of 10.
  • cargo clippy --workspace --all-targets --locked -- -D warnings clean
  • cargo test -p thetadatadx-rs (1102 lib tests) pass
  • cargo fmt --all -- --check clean
  • binding-parity and SDK-surface regeneration produce no drift

Breaking change

The default of exclusive on the trade_quote endpoints changes from false to true. A caller that relied on the previous <= matching must now pass exclusive=false explicitly.

The v3 terminal injects exclusive=true when the value is omitted on the trade_quote endpoints, so each trade is paired with the last NBBO quote strictly before it. The typed SDK builders defaulted exclusive to false (the documented proto default), so an omitted value paired a different NBBO than the terminal: a systematic ask and size divergence on option_history_trade_quote and stock_history_trade_quote.

Default exclusive to true so the typed SDK matches the terminal's paired quote when the caller does not specify it. Verified 1:1 against the terminal on a bounded single-contract window: 0 of 10 quote rows differ, down from 7 of 10.

BREAKING CHANGE: the default of exclusive on the trade_quote endpoints changed from false to true.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant