3 releases
1.0.1-alpha | Jun 23, 2021 |
---|---|
1.0.0-alpha | Jun 13, 2021 |
0.1.2 |
|
0.1.1 |
|
0.1.0 |
|
#13 in #coinbase
86KB
1.5K
SLoC
Coinbase Client
A Rust wraper for the Coinbase Pro API
Usage
Requires Tokio runtime
use coinbase_client::private_client::*;
// placing a market order
#[tokio::main]
async fn main() {
let client = PrivateClient::new("YOUR_API_SECRET", "YOUR_API_PASSPHRASE", "YOUR_API_KEY")
let order = OrderBuilder::market(OrderSide::Buy, "BTC-USD", SizeOrFunds::Size(0.02)).build();
let order_id = client.place_order(order).await.expect("unable to place order");
}
lib.rs
:
A library for the Coinbase Pro API.
Coinbase Client is separated into two categories: PrivateClient
and PublicClient
. PrivateClient
requires authentication and provide access to placing orders and other account information. PublicClient
provides market data and is public.
Dependencies
~11–24MB
~326K SLoC