Repository navigation
6.0: one set of tick types for tick_by_tick and historical_ticks - #1244
Open
tradatious wants to merge 1 commit into
Open
tradatious wants to merge 1 commit into
tradatious wants to merge 1 commit into
Conversation
tradatious
force-pushed
the
api_b_tick-types
branch
3 times, most recently
from
November 16, 2026 05:08
11e12bf to
fef37a1
Compare
Contributor
Author
|
Pushed an update: historical decoder tests for absent, sentinel and malformed sizes, trade and bid/ask test builders that send a size by default, and a historical Two questions on the shape:
|
tick_by_tick and historical_ticks both yield market_data::TickLast,
TickBidAsk and TickMidpoint, with proto field names; realtime::{Trade,
BidAsk, MidPoint, TradeAttribute, BidAskAttribute} are removed,
HistoricalTicksBuilder::trade() becomes last(), and historical trade and
bid/ask sizes become f64. The two families decoded the same proto
messages. Corrects the IgnoreSize rustdoc. Updates examples, integration
tests, the parse_decimal_or_zero rustdoc, CHANGELOG, the 6.0 migration
guide, the market-data wire facts and the domain-module-layout rule node.
Migration §39.
tradatious
force-pushed
the
api_b_tick-types
branch
from
November 16, 2026 11:57
fef37a1 to
e35e77d
Compare
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.
Description
A tick-by-tick frame carries the same proto messages as a historical ticks reply (
HistoricalTickLast,HistoricalTickBidAsk,HistoricalTick), but the crate decoded them into two unrelated struct families with different names and field names. Both requests now yieldTickLast,TickBidAskandTickMidpoint, defined once inmarket_data(newticks.rs, re-exported fromrealtimeandhistorical) and decoded by one converter per proto message inmarket_data/common/decoders.rs.realtime::{Trade, BidAsk, MidPoint, TradeAttribute, BidAskAttribute}are removed; field names follow the proto;HistoricalTicksBuilder::trade()becomeslast(), the nameTickByTickBuilderuses.Sizes follow the always-sent finding in #1240: trade and bid/ask sizes are
f64on both paths, so historical sizes move fromOption<f64>(#718) tof64. A BTC/PAXOS tick-by-tick run and an AAPL historical-ticks run (paper Gateway, server 226) found every trade and bid/ask tick carrying its sizes; recorded indocs/wire-facts/market-data.md. KeepingOptionacross the family instead would be a small change if you prefer it.TickMidpoint::sizestaysOption<f64>: live midpoint frames carried no size, and historical ones carried0.Those runs and a historical
bid_ask(IgnoreSize::Yes)run contradict theIgnoreSize::Yesrustdoc ("Tick sizes are omitted from the response"): on both tick-by-tick (BTC) and historical (AAPL) bid/ask ticks,Yesstill sent both sizes on every update and left out the updates that changed only a size. TheIgnoreSizeandbid_askterminal docs now say that.The
parse_decimal_or_zerorustdoc's list ofOptionfields now namesTickMidpoint::sizerather than the historical tick sizes.The market-data test builders keep
Optionsize fields althoughTickLast::sizeandTickBidAsk::size_bid/size_askaref64: they model whether the frame carries the field, which the absent-size test cases need.Migration §39.
Testing
cargo fmt --checkcargo clippy --all-targets -- -D warningscargo clippy --all-targets --no-default-features --features sync -- -D warningscargo clippy --all-targets --all-features -- -D warningsRUSTDOCFLAGS="-D warnings" cargo doc --no-deps(default, sync-only and all-features)cargo test(default, sync-only and all-features)cargo build --examples(default, sync-only and all-features)cargo build -p ibapi-integration-sync --testsand-p ibapi-integration-async --testscargo clippy -p ibapi-integration-sync --tests -- -D warningsand-p ibapi-integration-asynctools/check-rules-graph.shBreaking changes
Yes. Rename the types, fields and
trade()as in the migration table; historical trade and bid/ask sizes aref64; serialized keys change. Migration §39.