Repository navigation
v2.9.2
What's New
utoipa feature flag with ToSchema on public types (#428)
Optional utoipa feature that derives ToSchema on all public data model types, enabling direct use in OpenAPI schema generation.
// Cargo.toml
// [dependencies]
// ibapi = { version = "2.9", features = ["utoipa"] }
// Public data model types (Contract, Order, Execution, etc.) now impl
// utoipa::ToSchema so they can be used directly in utoipa's
// #[utoipa::path] and OpenApi derivesBug Fixes
Send CancelHistoricalData when streaming subscription is dropped (#430)
historical_data_streaming subscriptions now properly send a cancel message to the server when dropped or explicitly cancelled, preventing orphaned server-side subscriptions.
let mut subscription = client
.historical_data_streaming(&contract, 1.days(), HistoricalBarSize::Min, None)
.await?;
// Cancel is now automatically sent when subscription is dropped
drop(subscription);
// Explicit cancel is also supported and idempotent
// subscription.cancel();Correct cancel_order and global_cancel encoding for server >= 192 (#429)
Fixed message encoding for cancel_order and global_cancel on servers supporting CME tagging fields (v192+). The version field is now correctly omitted, and ext_operator and manual_order_indicator fields are appended to match the reference client.
// cancel_order and global_cancel now work correctly
// against IB Gateway / TWS server versions >= 192
client.cancel_order(order_id, "").await?;
client.global_cancel().await?;