Skip to content

Commit

Permalink
feat: update defillama api url
Browse files Browse the repository at this point in the history
  • Loading branch information
EvolveArt committed Oct 16, 2024
1 parent 63edb69 commit 926e207
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/monitoring/on_off_deviation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/monitoring/price_deviation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub async fn price_deviation<T: Entry>(

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
Expand Down Expand Up @@ -101,7 +101,7 @@ pub async fn raw_price_deviation(pair_id: &String, price: f64) -> Result<f64, Mo

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 = chrono::Utc::now().timestamp(),
id = coingecko_id,
apikey = api_key
Expand Down

0 comments on commit 926e207

Please sign in to comment.