ibkr

Crates.ioibkr
lib.rsibkr
version0.2.0
created_at2025-11-30 21:32:25.51007+00
updated_at2025-12-01 00:48:43.765275+00
descriptionA Rust client for the Interactive Brokers TWS API
homepage
repositoryhttps://github.com/Wxveshack/ibkr
max_upload_size
id1958872
size80,412
Brandon J. Lacy (AG3NTZ3R0)

documentation

README

ibkr

A Rust client for Interactive Brokers' TWS API.

Usage

use ibkr::{Client, Contract, BarSize, Duration, WhatToShow};

#[tokio::main]
async fn main() -> ibkr::Result<()> {
    let client = Client::connect("127.0.0.1:7496", 1).await?;

    let contract = Contract::stock("AAPL", "SMART", "USD");
    let bars = client.historical_data(
        contract,
        Duration::Days(5),
        BarSize::Day1,
        WhatToShow::Trades,
        true,
    ).await?;

    for bar in bars {
        println!("{}: {}", bar.date, bar.close);
    }
    Ok(())
}

Architecture

See CLAUDE.md.

IBKR Documentation

https://www.interactivebrokers.com/campus/ibkr-api-page/twsapi-doc/#api-introduction

Commit count: 0

cargo fmt