fix(mdds)!: default trade_quote exclusive to true, matching the terminal#1216
Open
userFRM wants to merge 1 commit into
Open
fix(mdds)!: default trade_quote exclusive to true, matching the terminal#1216userFRM wants to merge 1 commit into
userFRM wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The typed SDK's
trade_quoteendpoints diverged from the v3 terminal on the paired NBBO quote. The terminal injectsexclusive=truewhen the value is omitted (pairing each trade with the last quote strictly before it), while the typed SDK builders defaultedexclusivetofalse. This flips the SDK default totrueso 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_quoteandstock_history_trade_quotewere 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
cargo clippy --workspace --all-targets --locked -- -D warningscleancargo test -p thetadatadx-rs(1102 lib tests) passcargo fmt --all -- --checkcleanBreaking change
The default of
exclusiveon thetrade_quoteendpoints changes fromfalsetotrue. A caller that relied on the previous<=matching must now passexclusive=falseexplicitly.