Crates.io | coinbase-api |
lib.rs | coinbase-api |
version | 0.2.1 |
source | src |
created_at | 2018-07-31 16:17:13.145473 |
updated_at | 2018-08-03 11:32:57.217833 |
description | Client library for the Coinbase Pro API. |
homepage | |
repository | https://github.com/thomas-huet/coinbase-api-rust |
max_upload_size | |
id | 76827 |
size | 52,700 |
Client library for the Coinbase Pro API. Requests are asynchronous and return futures.
Basic example to list all currency pairs trading on the exchange:
extern crate coinbase_api;
extern crate hyper;
use coinbase_api::*;
use hyper::rt::Future;
fn make_future() -> impl Future<Item=(), Error=()> {
let client = MarketDataClient::new(SANDBOX).unwrap();
client.products()
.map(|products| {
println!("Pairs available for trading:");
for p in products {
println!("{}", p.id);
}
})
.map_err(|err| println!("Error: {:?}", err))
}
fn main() {
hyper::rt::run(make_future());
}