Skip to content

Remove fundamental data support (TWS 10.47) - #705

Merged
wboayue merged 1 commit into
mainfrom
remove-fundamentals
Jul 16, 2026
Merged

Remove fundamental data support (TWS 10.47)#705
wboayue merged 1 commit into
mainfrom
remove-fundamentals

Conversation

@wboayue

@wboayue wboayue commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Summary

IBKR fully removed the fundamental-data feature from the TWS API in 10.47 (reqFundamentalData, cancelFundamentalData, both callbacks, and the FUNDAMENTAL_RATIOS = 47 tick) with no replacement — the fundamentals.html doc now redirects to Wall Street Horizon. This removes our matching implementation (plan Option 2).

Implements plans/csharp-sync-pr-d-fundamentals.md and unblocks PR-B: the 3 Fundamentals* proto structs in the generated src/proto/protobuf.rs are now unreferenced, so PR-B's regen drops them with no dangling refs.

Changes

Removed

  • src/fundamental/ (module, sync/async impls, common encoders/decoders, tests)
  • Client::fundamental_data, FundamentalData, FundamentalReportType
  • src/testdata/builders/fundamental.rs, both examples (+ Cargo.toml entries), both integration tests
  • Features::FUNDAMENTAL_DATA (kept server_versions::FUNDAMENTAL_DATA as protocol history)

TickType — dropped FundamentalRatios (id 47); id 47 now decodes to TickType::Unknown via the existing catch-all.

Protocol vocabulary kept (TickEFP precedent, rule 19)IncomingMessages::FundamentalData = 51 and OutgoingMessages::{Request,Cancel}FundamentalData remain as known-but-unclaimed variants so From<i32>/TryFrom still map old-server ids to named variants. FundamentalData was removed from the text_request_id_field routing allow-list (no decoder awaits it).

DocsCHANGELOG.md Removed entry; docs/migration-3.0.md §34.

Verification

Green across all configs: build + clippy + test for async / sync / all-features, all three rustdoc configs, and both integration crates (build + clippy).

IBKR removed the fundamental-data feature (reqFundamentalData/
cancelFundamentalData, both callbacks, and the FUNDAMENTAL_RATIOS tick)
from the TWS API in 10.47 with no replacement. Remove our matching
implementation; unblocks the protobuf regen in PR-B (the 3 Fundamentals*
proto structs are now unreferenced and vanish cleanly on regen).

- Delete src/fundamental/, the sync/async Client::fundamental_data
  methods, testdata builder, both examples, and the integration tests.
- Remove Features::FUNDAMENTAL_DATA; keep server_versions::FUNDAMENTAL_DATA
  as protocol history.
- Drop TickType::FundamentalRatios (id 47); id 47 now decodes to Unknown.
- Keep IncomingMessages::FundamentalData / OutgoingMessages::
  {Request,Cancel}FundamentalData as known-but-unclaimed protocol variants
  (TickEFP precedent), but drop FundamentalData from the request_id routing
  allow-list — no decoder awaits it.
- CHANGELOG Removed + docs/migration-3.0.md §34.
@wboayue
wboayue merged commit 028d230 into main Jul 16, 2026
5 checks passed
@wboayue
wboayue deleted the remove-fundamentals branch July 16, 2026 05:56
wboayue added a commit that referenced this pull request Jul 16, 2026
* Add Order.hedge_max_size + server-version support through 225

Sync with C# TWS API reference (TWS 10.47.01).

- Regenerate proto: adds Order.hedge_max_size (tag 144, int32 optional,
  server 223 / TWS 10.45); drops now-unused fundamentals structs (removed
  in #705); picks up additive ContractDetails.settlement_method.
- Surface hedge_max_size (Option<i32>) on public Order; map in proto
  encoder/decoder; gate on server_versions::HEDGE_MAX_SIZE in verify_order
  (mirrors C# ValidateOrderParameters).
- Add server_versions 222-225 (FRACTIONAL_LAST_SIZE, HEDGE_MAX_SIZE,
  USE_PRECISION_FROM_SEC_DEF, ODD_LOT_BID_ASK_QUOTES).
- Advertise max server version 225; update handshake fixtures.
- Add generic_tick::ODD_LOT ("787") request-side tick for odd-lot bid/ask.
- Tests: encoder/decoder, verify gate boundaries, end-to-end place_order
  (sync+async) decoding captured wire bytes.

* simplify: derive handshake fixtures from constants; trim redundant hedge_max_size tests

- transport/sync_tests: 17 hardcoded v213..225 handshake strings now derive
  from handler.min_version/max_version via handshake_request() helper, so
  future version ratchets need no fixture edits (rule 21).
- Delete verify_tests.rs: its MockClient re-implemented check_server_version;
  all gate branches are covered end-to-end by the real-path place_order tests
  (below-gate reject, at-gate accept, None-skips-gate via the base place_order).
- Trim non-load-bearing hedge_type/hedge_param from the hedge_max_size
  encoder/decoder/place_order tests; fold the standalone none-omitted encode
  assertion into test_encode_order_default_fields_omitted.
wboayue added a commit that referenced this pull request Jul 17, 2026
* Add Order.deactivate field (TWS 10.48)

Since TWS 10.48, reqOpenOrders returns de-activated orders. Surface
Order.deactivate (bool) so callers can distinguish inactive orders from
active ones.

- Public Order.deactivate field + Default.
- Map both directions in proto encoders/decoders (some_bool / unwrap_or_default),
  matching the C# EDecoderUtils/EClientUtils round-trip. No server-version
  gate (Order.Deactivate predates the proto floor).
- Encode + decode unit tests; CHANGELOG Added.

Also prune completed C#-sync plan files (PRs #705/#706/#707/#708 shipped) and
refresh plans/csharp-sync-coverage.md.

* Fill PR number in changelog (#709)
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