Skip to content

Releases: wboayue/ironbeam-rs

v0.2.0

03 Apr 05:03
d931110

Choose a tag to compare

New Features

  • Client::front_month() — resolve the active front-month contract for a futures product with configurable roll-ahead window. Skips expired contracts and handles missing/empty security definitions gracefully.
  • StreamEvent serde supportStreamEvent now derives Serialize and Deserialize, enabling JSON round-tripping of streaming events.

Bug Fixes

  • front_month skips expired contracts — the previous implementation assumed futures_symbols[0] was always active. Now walks contracts individually, checking expiration via security_definitions.

Documentation

  • Documented security_definitions batch API caveat: the endpoint silently returns empty results when any symbol in a multi-symbol request is expired or invalid.

v0.1.0

31 Mar 06:17

Choose a tag to compare

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)