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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
//! # Coinpaprika API
//!
//! Coinpaprika API Rust library provides access to [Coinpaprika API](https://api.coinpaprika.com/)
//! for applications written in Rust programming language.
//!
//! [Coinpaprika API](https://api.coinpaprika.com/) delivers precise & frequently updated market
//! data from the world of crypto: coin prices, volumes, market caps, ATHs, return rates and more.
//!
//!
//! ## Usage
//!
//! Put this in your Cargo.toml:
//!
//! ```toml
//! [dependencies]
//! coinpaprika_api = "0.1"
//! ```
//!
//! Then you can use it like this:
//!
//! ```rust
//! use coinpaprika_api::client::Client;
//! use coinpaprika_api::global::Global;
//! use std::error::Error;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn Error>> {
//! let client = Client::new();
//!
//! let global: Global = client.global().send().await?;
//! println!("global: {:#?}", global);
//!
//! Ok(())
//! }
//! ```
//!
//! We include examples for each section of the API, located in `/examples` folder.
//!
//!
//! ## Supported Endpoints
//!
//! - Key
//! - [x] Get API key info
//!
//! - Global
//! - [x] Get market overview data
//!
//! - Coins
//! - [x] List coins
//! - [x] Get coin by ID
//! - [x] Get Twitter timeline tweets for a coin
//! - [x] Get coin events by coin ID
//! - [x] Get exchanges by coin ID
//! - [x] Get markets by coin ID
//! - [x] Get OHLC for the last full day
//! - [x] Get historical OHLC
//! - [x] Get today OHLC
//!
//! - People
//! - [x] Get person by ID
//!
//! - Tags
//! - [x] List tags
//! - [x] Get tag by ID
//!
//! - Tickers
//! - [x] Get tickers for all active coins
//! - [x] Get ticker for a specific coin
//! - [x] Get historical ticks for a specific coin
//!
//! - Exchanges
//! - [x] List exchanges
//! - [x] Get exchange by ID
//! - [x] List an exchange markets
//!
//! - Tools
//! - [x] Search
//! - [x] Price converter
//!
//! - Contracts
//! - [x] List contracts platforms
//! - [x] Get all contract addressess for a given platform
//! - [ ] Redirect to Ticker by contract address
//! - [ ] Redirect to historical ticks by contract address
//!
//! - Changelog
//! - [x] Get id changelog for all coins
//!
//! - Beta
//! - [ ] List sentiment coins
//! - [ ] Get sentiment data for a specific coin
//! - [ ] Get historical sentiment data for a specific coin
//!
//!
//! ## License
//!
//! CoinpaprikaAPI Rust client is available under the MIT license. See the [LICENSE file](./LICENSE) for more info.
//!
/// Client struct used for connecting with coinpaprika.com
/// Possible errors Client can return
//
// API Sections
//
/// Requests for "Key" section of the API
/// Requests for "Global" section of the API
/// Requests for "Coins" section of the API
/// Requests for "People" section of the API
/// Requests for "Tags" section of the API
/// Requests for "Tickers" section of the API
/// Requests for "Exchanges" section of the API
/// Requests for "Tools" section of the API
/// Requests for "Contracts" section of the API
/// Requests for "Changelog" section of the API