coinbase-client 1.0.1-alpha

asynchronous library for the Coinbase's Pro API
Documentation

Coinbase Client Latest Version

A Rust wraper for the Coinbase Pro API

Documentation

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");
}