coinbase_pro 0.1.0

A Rust API for retriving data and placing trades on Coinbase Pro
docs.rs failed to build coinbase_pro-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: coinbase_pro-0.1.1

coinbase_pro is an api for getting market data from the coinbase pro public API. This crate aims to be a simple lightweight interface for making requests to coinbase's API. This crate also aims to make available abstractions at the lowest level possible. This allows users to specify how the responses get parsed.

Quickstart Info

This api has a main client struct called [CBProAPI]. This struct is like a reqwest struct and can be cheaply copied, cloned, and passed between threads. Internally it implements its state utilizing std::sync::Arc and tokio::sync::Mutex.

Future Proofing

In addition to the standard usage of this api through [CBProAPI], this crate exposes a low level [CBRequestBuilder] that allows additional endpoints and custom deserialization if coinbase ever changed their api, endpoints, or data formats.

Examples

Basic Usage

use coinbase_pro::api::CBProAPI;

fn main() {
let api = CBProAPI::default();
let product = api.get_product("ETH-USD".to_string()).await.unwrap();

assert_eq!(product.display_name, "ETH-USD");
}