We're excited to announce the public release of the Rust version of CCXT, starting from version 4.5.78 🚀
Rust stable (edition 2021) and a tokio runtime are required.
The crates are available on crates.io:
https://crates.io/crates/ccxt - REST exchanges
https://crates.io/crates/ccxt-pro - WebSocket (watch_*) exchanges
https://crates.io/crates/ccxt-prediction - prediction markets
Example
use ccxt::{Binance, Config, Params};
#[tokio::main]
async fn main() -> Result<(), ccxt::ExchangeError> {
let mut exchange = Binance::with_config(
Config::new()
.api_key("your api key")
.secret("your secret"),
);
let order = exchange
.create_order("ETH/USDT", "market", "buy", 0.5, None, Params::none())
.await?;
println!("{:?} {:?}", order.id, order.status);
Ok(())
}You can check some examples here: https://github.com/ccxt/ccxt/tree/master/examples/rust
Thank you for using CCXT!
Yours, the CCXT Dev Team. ✅