1 unstable release
0.1.0 | Feb 26, 2022 |
---|
#87 in #development
82KB
2K
SLoC
An unofficial SDK for the cryptomrkt API for Rust. The API currently only supports the websocket cryptomrkt API.
# || -> cryptomrkt::Result {async {
use dotenv::*;
use cryptomrkt::{TradingClient, NewOrderBuilder, Buy};
let mut client = TradingClient::new(var("private_key")?, var("public_key")?).await?;
let order = NewOrderBuilder::new()
.symbol("BTCCLP")
.side(Buy)
.quantity(1.0)
.price(100.0)
.build();
client.place_order(order).await?;
# Ok(())
# };}
lib.rs
:
An unofficial SDK for the cryptomrkt API for Rust. The API currently only supports the websocket cryptomrkt API.
use dotenv::*;
use cryptomkt::{TradingClient, NewOrderBuilder, Buy};
let mut client = TradingClient::new(var("private_key")?, var("public_key")?).await?;
let order = NewOrderBuilder::new()
.symbol("BTCCLP")
.side(Buy)
.quantity(1.0)
.price(100.0)
.build();
client.place_order(order).await?;
Dependencies
~16–32MB
~566K SLoC