You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CoinGecko is our fallback market data provider. It operates on its own coin ids to identify each token. At the moment coin id is fetched so later token symbol can be mapped to coin id for url.
CoinGecko api (coins/list) returns mapping where token symbol name can be mapped to different values meaning token symbol will be later mapped to wrong coingecko's coin id.
To prevent that other APIs must be used.
Steps:
Remove coins/list API call and add 3 token_price/{id} API calls with token contract addresses for each network - https://docs.coingecko.com/v3.0.1/reference/simple-token-price . This might require additional thought to optimize grouping the contract addresses to correct networks.
After checking each endpoint response I found out that even when we would use addresses there still might be some problems, because not all addresses exists on coingecko.
I found out that we can pintpoint correct tokens by checking platforms property and marking those on eth platform. This might still produce some corner case errors, but it gives us best coverage.
CoinGecko is our fallback market data provider. It operates on its own coin ids to identify each token. At the moment coin id is fetched so later token symbol can be mapped to coin id for url.
CoinGecko api (
coins/list
) returns mapping where token symbol name can be mapped to different values meaning token symbol will be later mapped to wrong coingecko's coin id.To prevent that other APIs must be used.
Steps:
coins/list
API call and add 3token_price/{id}
API calls with token contract addresses for each network - https://docs.coingecko.com/v3.0.1/reference/simple-token-price . This might require additional thought to optimize grouping the contract addresses to correct networks.While it increase number of requests, it will allow to get proper values for prices.
The text was updated successfully, but these errors were encountered: