diff --git a/src/coin_gecko.rs b/src/coin_gecko.rs index 1e926cb..5d2a479 100644 --- a/src/coin_gecko.rs +++ b/src/coin_gecko.rs @@ -127,7 +127,8 @@ pub async fn get_current_price(token: &MaybeToken) -> Result, } - let coins = reqwest::get(url).await?.json::().await?; + let client = reqwest::Client::builder().user_agent("sys").build()?; + let coins = client.get(url).send().await?.json::().await?; coins .solana @@ -184,7 +185,10 @@ pub async fn get_historical_price( when.year() ); - reqwest::get(url) + let client = reqwest::Client::builder().user_agent("sys").build()?; + client + .get(url) + .send() .await? .json::() .await?