Interactive Brokers TWS API (Rust)
Overview
Min. TWS API Version: 149
Goals
- Keep core code separate so it can be used in both async and sync clients.
- Compatible with stable Rust.
Non Goals
- Design parity with the official API.
Usage
Tokio
let client = {
let transport = ib_tws_tokio::Transport::connect(
"127.0.0.1:4001".parse().unwrap(),
Duration::from_secs(5),
)
.await?;
ib_tws_core::AsyncClient::setup(transport, 0).await?
};
info!(version = client.server_version(), "connected to client");
Crates
ib_tws_core
Contains core components including messages and encoding/decoding utilities, as well as a high-level AsyncClient
.
ib_tws_tokio
A transport implementation using Tokio, intended to be used with the ib_tws_core::AsyncClient
.
Credits
ib_tws_core
is forked from chrisdamba's ib_async.