7 releases (4 breaking)
0.5.0 | Apr 30, 2024 |
---|---|
0.4.2 | Aug 9, 2022 |
0.3.0 | Aug 1, 2022 |
0.2.0 | Aug 1, 2022 |
0.1.0 | Jun 25, 2022 |
#27 in #getting
12KB
Crypto Prices Lib
Docs
Crate pubshlied here Docs are available here
Example
A example for getting the price of Ergo against Bitcoin
use anyhow::Result;
use crypto_prices_lib::{get_marketcap, get_price};
#[tokio::main]
async fn main() -> Result<()> {
let price = get_price("ergo", "usd").await.unwrap();
println!("{:?}", price);
let marketcap = get_marketcap("ergo", "usd").await.unwrap();
println!("{:?}", marketcap);
Ok(())
}
The result
1.29
96616969.50238612
Dependencies
~6–17MB
~224K SLoC