Skip to content

Commit

Permalink
fix(price_endpoints): add cached url (KomodoPlatform#2032)
Browse files Browse the repository at this point in the history
An additional PRICE_ENDPOINTS url which is a cached copy of https://prices.komodian.info/api/v2/tickers and is updated every minute was added by this commit. This should serve as a reliable fallback when rate limiting becomes an issue.
  • Loading branch information
smk762 authored Dec 14, 2023
1 parent da8a23b commit 1755d57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mm2src/coins/lp_price.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ use std::collections::HashMap;
#[cfg(feature = "run-docker-tests")] use std::str::FromStr;
use std::str::Utf8Error;

const PRICE_ENDPOINTS: [&str; 2] = [
const PRICE_ENDPOINTS: [&str; 3] = [
"https://prices.komodian.info/api/v2/tickers",
"https://prices.cipig.net:1717/api/v2/tickers",
"https://defi-stats.komodo.earth/api/v3/prices/tickers_v2",
];

#[derive(Debug)]
Expand Down

0 comments on commit 1755d57

Please sign in to comment.