ibapi 1.2.2

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.
Documentation
use ibapi::accounts::AccountUpdate;
use ibapi::Client;

fn main() {
    env_logger::init();

    let client = Client::connect("127.0.0.1:4002", 100).expect("connection failed");

    let account = "DU1234567";

    let subscription = client.account_updates(account).expect("error requesting account updates");
    for update in &subscription {
        println!("{update:?}");

        // stop after full initial update
        if let AccountUpdate::End = update {
            subscription.cancel();
        }
    }
}