| Crates.io | ibkr |
| lib.rs | ibkr |
| version | 0.2.0 |
| created_at | 2025-11-30 21:32:25.51007+00 |
| updated_at | 2025-12-01 00:48:43.765275+00 |
| description | A Rust client for the Interactive Brokers TWS API |
| homepage | |
| repository | https://github.com/Wxveshack/ibkr |
| max_upload_size | |
| id | 1958872 |
| size | 80,412 |
A Rust client for Interactive Brokers' TWS API.
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(())
}
See CLAUDE.md.
https://www.interactivebrokers.com/campus/ibkr-api-page/twsapi-doc/#api-introduction