Skip to content

v0.1.0

Choose a tag to compare

@wboayue wboayue released this 31 Mar 06:17
· 11 commits to main since this release

ironbeam-rs v0.1.0

Initial release of the async Rust client for the Ironbeam futures trading API.

Highlights

  • REST API — full coverage of accounts, balances, positions, risk, fills, market data (quotes, depth, historical trades), orders (place, update, cancel, query), info (trader, user, security definitions, symbol search, exchanges), and simulation endpoints
  • WebSocket streaming — real-time quotes, depth, trades, and indicator bars (trade/tick/time/volume) with typed StreamEvent dispatch
  • Type-safe buildersOrderBuilder (market, limit, stop, stop-limit), SymbolSearchParams, RiskBuilder, LiquidateBuilder
  • Built-in rate limiting — configurable requests-per-second throttle to stay within Ironbeam's 10 req/s limit
  • Unified domain types — single structs deserialize from both REST (camelCase) and streaming (abbreviated) JSON via #[serde(alias)]
  • Dual-format enums — custom deserializers accept both string (REST) and integer (streaming) representations
  • Auto-logout on dropClient sends logout request when dropped
  • Zero panics — no unwrap()/expect() in library code; all errors are typed via thiserror

API Surface

// Connect
let client = Client::builder()
    .credentials(Credentials { username, password, api_key })
    .demo()
    .rate_limit(8)
    .connect().await?;

// REST
client.all_accounts().await?;
client.balance(account_id, BalanceType::CurrentOpen).await?;
client.quotes(&["XCME:ES.U26"]).await?;
client.place_order(account_id, &order).await?;

// Streaming
let mut stream = client.stream().start().await?;
stream.subscribe_quotes(&["XCME:ES.U26"]).await?;
while let Some(event) = stream.next().await { /* ... */ }

Stack

Concern Crate
Async runtime tokio
HTTP hyper + hyper-rustls
WebSocket fastwebsockets
Serialization serde + serde_json
Date/time time
Errors thiserror
Logging tracing

Requirements

  • Rust 1.85+ (edition 2024)
  • Ironbeam API credentials (username, password, API key)