Rust Rithmic R | Protocol API client
Unofficial rust client for connecting to Rithmic's R | Protocol API.
Not all functionality has been implemented, but this is currently being used to trade live capital through Rithmic.
Only order_plant, ticker_plant, pnl_plant, history_plant are provided. Each plant uses the actor pattern so you'll want to start a plant, and communicate / call commands with it using it's handle. The crate is setup to be used with tokio channels.
Installation
You can install it from crates.io
$ cargo add rithmic-rs
Or manually add it to your Cargo.toml file.
[dependencies]
rithmic-rs = "0.3.6"
Usage
Store your credentials in a .env file.
# .env
RITHMIC_TEST_USER=<USER_NAME>
RITHMIC_TEST_PW=<PASSWORD>
RITHMIC_DEMO_USER=<USER_NAME>
RITHMIC_DEMO_PW=<PASSWORD>
RITHMIC_LIVE_USER=<USER_NAME>
RITHMIC_LIVE_PW=<PASSWORD>
Rithmic supports three types of account environments, RithmicConnectionSystem::Demo is used for paper trading, RithmicConnectionSystem::Live will connect to your funded account, and RithmicConnectionSystem::Test connects to the test environment before your app is approved.
To use this crate, pass in your account information to one of the plants. Doing so will spawn an actor in a new thread that listens to commands that you send via a handle. Some plants like the ticker plant will also include a broadcast channel that you can listen to for wire level updates.
pub async
Contribution
Contributions encouraged and welcomed!
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.