Crates.io | coinbase-client |
lib.rs | coinbase-client |
version | 1.0.1-alpha |
source | src |
created_at | 2021-05-15 23:46:57.546836 |
updated_at | 2021-06-23 14:43:18.139385 |
description | asynchronous library for the Coinbase's Pro API |
homepage | |
repository | https://github.com/ElijahWoelbing/coinbase_client |
max_upload_size | |
id | 398029 |
size | 99,727 |
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");
}