1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Official Rust SDK for the [Cryptohopper](https://www.cryptohopper.com) API.
//!
//! # Quickstart
//!
//! ```no_run
//! use cryptohopper::Client;
//!
//! # async fn run() -> Result<(), cryptohopper::Error> {
//! let ch = Client::new(std::env::var("CRYPTOHOPPER_TOKEN").unwrap())?;
//!
//! let me = ch.user.get().await?;
//! println!("{}", me);
//!
//! let ticker = ch
//! .exchange
//! .ticker(&serde_json::json!({"exchange": "binance", "market": "BTC/USDT"}))
//! .await?;
//! println!("{}", ticker["last"]);
//! # Ok(())
//! # }
//! ```
//!
//! # Full configuration
//!
//! ```no_run
//! use cryptohopper::Client;
//! use std::time::Duration;
//!
//! # fn run() -> Result<(), cryptohopper::Error> {
//! let ch = Client::builder()
//! .api_key("ch_...")
//! .app_key("your_client_id")
//! .base_url("https://api-staging.cryptohopper.com/v1")
//! .timeout(Duration::from_secs(60))
//! .max_retries(5)
//! .user_agent("my-bot/1.0")
//! .build()?;
//! # let _ = ch;
//! # Ok(())
//! # }
//! ```
pub use ;
pub use ;
pub use Value;