Releases: wboayue/ironbeam-rs
Releases · wboayue/ironbeam-rs
v0.2.0
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.StreamEventserde support —StreamEventnow derivesSerializeandDeserialize, enabling JSON round-tripping of streaming events.
Bug Fixes
front_monthskips expired contracts — the previous implementation assumedfutures_symbols[0]was always active. Now walks contracts individually, checking expiration viasecurity_definitions.
Documentation
- Documented
security_definitionsbatch API caveat: the endpoint silently returns empty results when any symbol in a multi-symbol request is expired or invalid.
v0.1.0
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
StreamEventdispatch - Type-safe builders —
OrderBuilder(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 drop —
Clientsends logout request when dropped - Zero panics — no
unwrap()/expect()in library code; all errors are typed viathiserror
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)