2 unstable releases
0.3.0 | Nov 29, 2021 |
---|---|
0.2.0 | Nov 18, 2021 |
#33 in #order-book
24 downloads per month
Used in openlimits
155KB
4K
SLoC
This module provides functionality for communicating with the coinbase API.
Example
use openlimits::exchange::coinbase::Coinbase;
use openlimits::exchange::coinbase::CoinbaseParameters;
use openlimits::prelude::*;
use openlimits::model::market_pair::*;
#[tokio::main]
async fn main() {
let coinbase = Coinbase::new(CoinbaseParameters::production())
.await
.expect("Couldn't create coinbase client");
let market_pair = MarketPair(Currency::BTC, Currency::ETH);
let order_book = coinbase.order_book(&OrderBookRequest { market_pair })
.await
.expect("Couldn't get order book");
println!("{:?}", order_book);
}
Dependencies
~10–24MB
~365K SLoC