Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stores next order ID upon connection #192

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ibapi"
version = "1.0.4"
version = "1.0.5"
edition = "2021"
authors = ["Wil Boayue <[email protected]>"]
description = "A Rust implementation of the Interactive Brokers TWS API, providing a reliable and user friendly interface for TWS and IB Gateway. Designed with a focus on simplicity and performance."
Expand Down
2 changes: 1 addition & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl Client {
message_bus,
client_id: connection_metadata.client_id,
next_request_id: AtomicI32::new(9000),
order_id: AtomicI32::new(1000),
order_id: AtomicI32::new(connection_metadata.next_order_id),
};

Ok(client)
Expand Down
2 changes: 1 addition & 1 deletion src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ impl SubscriptionBuilder {

#[derive(Default, Clone, Debug)]
pub(crate) struct ConnectionMetadata {
next_order_id: i32,
pub(crate) next_order_id: i32,
pub(crate) client_id: i32,
pub(crate) server_version: i32,
pub(crate) managed_accounts: String,
Expand Down
Loading