Releases: pbeets/rithmic-rs
v0.6.2
Added
New Sender API Methods
Ticker Plant
request_rithmic_system_gateway_info(): Get gateway-specific informationrequest_get_instrument_by_underlying(): Get all instruments for an underlying symbolrequest_market_data_update_by_underlying(): Subscribe to market data by underlyingrequest_give_tick_size_type_table(): Get tick size table for a tick size typerequest_product_codes(): Get available product codes for an exchangerequest_get_volume_at_price(): Get volume profile for a symbolrequest_auxilliary_reference_data(): Get additional reference data for a symbolrequest_volume_profile_minute_bars(): Get minute bars with volume profilerequest_resume_bars(): Resume a truncated bars requestrequest_depth_by_order_snapshot(): Get depth by order snapshotrequest_depth_by_order_update(): Subscribe to depth by order updates
Order Plant
request_login_info(): Get current login session informationrequest_oco_order(): Place OCO (One Cancels Other) order pairsrequest_link_orders(): Link multiple orders togetherrequest_easy_to_borrow_list(): Get easy-to-borrow list for short sellingrequest_modify_order_reference_data(): Update user tag on existing orderrequest_order_session_config(): Get/set order session configurationrequest_replay_executions(): Replay historical execution data
Repository Plant (Agreements)
request_list_unaccepted_agreements(): List agreements not yet acceptedrequest_list_accepted_agreements(): List already accepted agreementsrequest_accept_agreement(): Accept a specific agreementrequest_show_agreement(): Get full agreement detailsrequest_set_rithmic_mrkt_data_self_cert_status(): Set market data self-certification status
API Ergonomics
- Re-exported
RithmicOcoOrderLegand related OCO order enums fromapimodule - Changed
RithmicOcoOrderLeg.trigger_pricefromf64toOption<f64>since it's only required for stop orders
New Market Data Messages (Ticker Plant)
TradeStatistics,QuoteStatistics,IndicatorPrices,EndOfDayPricesMarketMode,OpenInterest,FrontMonthContractUpdate,DepthByOrderEndEventSymbolMarginRate,OrderPriceLimits
New Order Plant Messages
UserAccountUpdate,AccountListUpdates,AccountRmsUpdates
New RithmicMessage Variants
ResponseReferenceData,ResponseFrontMonthContract,ResponseTimeBarUpdateResponseTickBarUpdate,ResponseAccountRmsUpdates
Fixed
- Clippy warning: use
is_multiple_of()instead of modulo check in connection retry logic
Documentation
- Updated README with dedicated Plants section describing each plant's functionality
- Improved configuration documentation (environment variables first, builder pattern second)
- Added reconnection example in Connection Strategies section
See CHANGELOG.md for full details.
v0.6.1
⚠️ Breaking Changes
Environment variable names have changed to support multiple environments simultaneously.
What Changed
All configuration variables now require environment prefixes (DEMO, LIVE, TEST):
Old (0.6.0 and earlier):
RITHMIC_ACCOUNT_ID=account123
FCM_ID=fcm123
IB_ID=ib123
RITHMIC_DEMO_USER=user
RITHMIC_DEMO_PW=passNew (0.6.1):
RITHMIC_DEMO_ACCOUNT_ID=account123
RITHMIC_DEMO_FCM_ID=fcm123
RITHMIC_DEMO_IB_ID=ib123
RITHMIC_DEMO_USER=user
RITHMIC_DEMO_PW=pass
RITHMIC_DEMO_URL=<provided_by_rithmic>
RITHMIC_DEMO_ALT_URL=<provided_by_rithmic>Migration Guide
Update your environment variables:
RITHMIC_ACCOUNT_ID→RITHMIC_<ENV>_ACCOUNT_IDFCM_ID→RITHMIC_<ENV>_FCM_IDIB_ID→RITHMIC_<ENV>_IB_ID
Add new required variables:
RITHMIC_<ENV>_URLRITHMIC_<ENV>_ALT_URL
See examples/.env.blank for a complete template.
Benefits
- ✅ Run multiple environments simultaneously (Demo + Live)
- ✅ Clear separation of environment configurations
- ✅ Consistent naming across all variables
- ✅ Better support for testing and development workflows
Code Quality Improvements
- Fixed rustfmt compliance issues
- Fixed clippy warning: use
.first()instead of.get(0)
Full Changelog: https://github.com/pbeets/rithmic-rs/blob/v0.6.1/CHANGELOG.md#061---2025-11-24
Release v0.6.0
📖 Migration Guide: See MIGRATION_0.6.0.md for migration instructions from 0.4.x or 0.5.x.
Breaking Changes
- Removed
connection_infomodule - deprecated types removed (useRithmicConfiginstead) - Removed
RithmicConfig::from_dotenv()method - consumers calldotenvy::dotenv()themselves - Removed
return_heartbeat_response()method from all plant handles - Updated to
dotenvycrate - moved to dev-dependencies (from deprecateddotenv)
Changed
- Connection health monitoring now fully automatic via WebSocket ping/pong
- Heartbeats sent automatically for protocol compliance
- Successful responses silently dropped
- Errors delivered as
HeartbeatTimeoutmessages
- Environment variable loading now consumer-controlled
- Library no longer forces approach for loading env vars
- Examples demonstrate using
dotenvy, but any method works
- Reduced code complexity - removed 500+ lines of deprecated code
Documentation
- Consolidated migration guides into single MIGRATION_0.6.0.md
- Removed dotenv/
.envreferences from library docs (examples still show usage) - Updated README with clearer examples and breaking changes summary
Installation
[dependencies]
rithmic-rs = "0.6.0"Full Changelog: v0.5.3...v0.6.0
v0.5.3 - API Expansion
v0.5.3 - API Expansion
This release adds extensive new API functionality for order history, risk management, symbol search, and trade routes, significantly expanding the capabilities of rithmic-rs.
🚀 Highlights
Order Management APIs
- Cancel all orders: New
cancel_all_orders()method to cancel all active orders across symbols/exchanges - Order history: Comprehensive methods to query historical orders with multiple levels of detail
- Query available dates
- Get summaries for specific dates
- Retrieve detailed order information
- Filter by basket ID
Risk Management APIs
- Account RMS info:
get_account_rms_info()for account-level risk limits - Product RMS info:
get_product_rms_info()for product-specific limits - Trade routes:
get_trade_routes()with optional subscription updates
Symbol Discovery APIs
- Symbol search:
search_symbols()with flexible filtering (exchange, product code, instrument type, pattern matching) - Exchange listing:
list_exchanges()to query available exchanges and permissions
📋 Changes
Added
-
🆕 10 new public methods across
RithmicOrderPlantHandleandRithmicTickerPlantHandlecancel_all_orders()show_order_history_dates()show_order_history_summary(date)show_order_history_detail(basket_id, date)show_order_history(basket_id)get_account_rms_info()get_product_rms_info()get_trade_routes(subscribe_for_updates)search_symbols(...)list_exchanges(user)
-
🔧 10 new request methods in
RithmicSenderApirequest_cancel_all_orders()- Template 346request_account_rms_info()- Template 304request_product_rms_info()- Template 306request_trade_routes()- Template 310request_search_symbols()- Template 109request_list_exchanges()- Template 342request_show_order_history_dates()- Template 318request_show_order_history_summary()- Template 324request_show_order_history_detail()- Template 326request_show_order_history()- Template 322
-
📨 New
TradeRoutemessage type for template ID 310- Handles trade route information
- Delivered as update message
- Supports subscription updates
Changed
- Extended
OrderPlantCommandenum with 8 new command variants - Extended
TickerPlantCommandenum with 2 new command variants - Updated receiver API to handle TradeRoute messages
Known Issues
⚠️ New code contains.unwrap()calls following existing patterns (may panic on errors)- TradeRoute message handler uses
.unwrap()on protobuf decode (receiver_api.rs:438) - Plant handle methods use multiple
.unwrap()calls on channel operations - These will be addressed in future releases for improved robustness
📚 Documentation
- CHANGELOG.md - Complete changelog
- All new methods include comprehensive documentation
- Template IDs documented for all new requests
📦 Installation
[dependencies]
rithmic-rs = "0.5.3"Full Changelog: v0.5.2...v0.5.3
v0.5.2 - Heartbeat Improvements
v0.5.2 - Heartbeat Improvements
This release adds optional heartbeat response handling and timeout detection for better connection health monitoring, while reverting the default heartbeat behavior to reduce subscription channel noise.
🚀 Highlights
Optional Heartbeat Response Handling
- New
return_heartbeat_response()method on all plant handles - Default: heartbeats use request/response pattern (not sent to channel)
- Enable during trading hours for explicit connection health monitoring
- Disable during off-hours to avoid false alarms
Heartbeat Timeout Detection
- New
HeartbeatManagertracks heartbeat response timeouts - Detects timeouts after 30 seconds (configurable)
- Non-blocking implementation with tokio
sleep_until() - New
RithmicMessage::HeartbeatTimeoutvariant for notifications
📋 Changes
Added
return_heartbeat_response()method on all plant handles (ticker, order, pnl, history)HeartbeatManagerfor tracking heartbeat response timeoutsRithmicMessage::HeartbeatTimeoutvariant for timeout notificationsHEARTBEAT_TIMEOUT_SECSconstant (30 seconds)
Changed
- Reverted heartbeat behavior: Responses no longer sent through subscription channel by default
- Previous behavior (0.5.0): All heartbeat responses delivered as updates
- New behavior: Only delivered if explicitly enabled via
return_heartbeat_response(true) - Reduces noise for applications that don't need heartbeat monitoring
- Renamed internal field
ignore_heartbeat_responsetoexpect_heartbeat_responsefor clarity
Fixed
- ✅ Fixed ResponseHeartbeat request_id extraction in receiver API
- ✅ Fixed ResponseHeartbeat routing in all plants
- ✅ Fixed clippy warning
tabs_in_doc_commentsinsrc/rti.rs - ✅ Updated all doctests to use current API
📚 Documentation
- CHANGELOG.md - Complete changelog
- Comprehensive documentation for heartbeat timeout detection
- Usage examples for connection health monitoring
📦 Installation
[dependencies]
rithmic-rs = "0.5.2"Full Changelog: v0.5.1...v0.5.2
v0.5.0
v0.5.0 - Stability and Connection Reliability
Major release focused on stability, ergonomics, and connection reliability. This release eliminates panics, introduces connection strategies, and provides a unified configuration API.
🚀 Highlights
Connection Strategies
- Simple: Fast-fail single connection attempt (recommended default)
- Retry: Indefinite retries with exponential backoff capped at 60 seconds
- AlternateWithRetry: Alternates between primary and beta URLs for maximum reliability
Unified Configuration API
- New
RithmicConfigtype with builder pattern andfrom_env()method - Replaces fragmented
AccountInfotypes with single, cohesive configuration - Proper error handling with
Resulttypes - no more panics on missing config
Connection Health Monitoring
- Heartbeat errors and forced logout events now visible in subscription channel
- Enables robust reconnection logic and real-time connection health tracking
- All connection health events delivered to applications for monitoring
⚠️ Breaking Changes
This is a breaking release. See MIGRATION_0.5.0.md for detailed migration guide.
Quick Migration Summary
-
Plant Initialization
// Before (0.4.x) let ticker_plant = RithmicTickerPlant::new(&account_info).await; // After (0.5.0) let config = RithmicConfig::from_env(RithmicEnv::Demo)?; let ticker_plant = RithmicTickerPlant::connect(&config, ConnectStrategy::Simple).await?;
-
Configuration
// Before (0.4.x) let account_info = AccountInfo { /* ... */ }; // After (0.5.0) let config = RithmicConfig::builder() .user("username".to_string()) .password("password".to_string()) .env(RithmicEnv::Demo) .build()?;
-
Error Handling
- Must now handle heartbeat errors in subscription channel
- Must handle forced logout events
- See migration guide for complete examples
📋 Changes
Added
ConnectStrategyenum with Simple, Retry, and AlternateWithRetry modesRithmicConfigunified configuration type with builder patternRithmicEnvenvironment selection enum (Demo, Live, Test)ConfigErrorfor type-safe configuration error handlingfrom_env()andfrom_dotenv()configuration loaders- Heartbeat responses now include error information
- Forced logout events delivered through subscription channel
Changed
- Plant constructors renamed:
new()→connect() - Return type changed to
Result<Plant, Box<dyn std::error::Error>> - All plants now require
ConnectStrategyparameter - Unified error handling pattern across all plants
- Retry strategies now retry indefinitely with max 60s backoff
Fixed
- ✅ Fixed panic on unknown message types
- ✅ Fixed panic on error responses in ticker plant
- ✅ Fixed panic on heartbeat errors across all plants
- ✅ Fixed inconsistent heartbeat logic (now only sent after login)
- ✅ Fixed MessageType decode unwraps with proper error handling
- ✅ Removed invalid
#[allow(dead_code)]annotations
Deprecated
AccountInfo→ UseRithmicConfigRithmicConnectionInfo→ UseRithmicConfigRithmicConnectionSystem→ UseRithmicEnvget_config()→ UseRithmicConfig::from_env()or builder
📚 Documentation
- CHANGELOG.md - Complete changelog
- MIGRATION_0.5.0.md - Step-by-step migration guide
- Updated README with new API examples
- Enhanced module documentation
📦 Installation
[dependencies]
rithmic-rs = "0.5.0"🔮 What's Next (v0.6.0)
- Move
dotenvto optional feature flag - Remove deprecated types
- Additional API improvements
Full Changelog: v0.4.2...v0.5.0
0.4.2
- added logging of unique user id for each session / plant
- update using server configured heartbeat interval
- added streaming live ticks example
- updated connect_async to use beta url if primary fails
Full Changelog: 0.4.1...0.4.2
0.4.1
- Updated channels to have more message capacity, to better cope with spikes in activity.
Full Changelog: 0.4.0...0.4.1
0.4.0
- Added ability to load time bars via
load_time_barsfrom the history plant- Added examples on how to pull historical data
- Added skeleton to load order book data via
subscribe_order_bookandrequest_depth_by_order_snapshot(this has not been tested) - Updated web sockets to use
TCP_NODELAY
Full Changelog: 0.3.6...0.4.0
0.3.6
- Updated Rithmic API to latest v0.84.0.0
Full Changelog: 0.3.5...0.3.6