From 926e207ef9450e812d37d5bbd5f90b8fdfac0da4 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Wed, 16 Oct 2024 23:44:39 +0100 Subject: [PATCH] feat: update defillama api url --- src/monitoring/on_off_deviation.rs | 2 +- src/monitoring/price_deviation.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/monitoring/on_off_deviation.rs b/src/monitoring/on_off_deviation.rs index c4a78a3..d28d832 100644 --- a/src/monitoring/on_off_deviation.rs +++ b/src/monitoring/on_off_deviation.rs @@ -83,7 +83,7 @@ pub async fn on_off_price_deviation( let request_url = if let Ok(api_key) = api_key { format!( - "https://coins.llama.fi/prices/historical/{timestamp}/coingecko:{id}?apikey={apikey}", + "https://pro-api.llama.fi/{apikey}/coins/prices/historical/{timestamp}/coingecko:{id}", timestamp = timestamp, id = coingecko_id, apikey = api_key diff --git a/src/monitoring/price_deviation.rs b/src/monitoring/price_deviation.rs index d069ca2..bfb88fe 100644 --- a/src/monitoring/price_deviation.rs +++ b/src/monitoring/price_deviation.rs @@ -53,7 +53,7 @@ pub async fn price_deviation( let request_url = if let Ok(api_key) = api_key { format!( - "https://coins.llama.fi/prices/historical/{timestamp}/coingecko:{id}?apikey={apikey}", + "https://pro-api.llama.fi/{apikey}/coins//prices/historical/{timestamp}/coingecko:{id}?apikey={apikey}", timestamp = query.timestamp().timestamp(), id = coingecko_id, apikey = api_key @@ -101,7 +101,7 @@ pub async fn raw_price_deviation(pair_id: &String, price: f64) -> Result