status-go
status-go copied to clipboard
Some tokens missing at specific market providers
Problem
We request prices for all (?) symbols that we support (taken from uniswap + our hardcoded?) from cryptocompare and coingecko. But coingecko does not support some of the symbols and returns error:
Error fetching prices error="cryptocompare.error: hystrix: timeout, coingecko.error: token not found for symbol AGEUR, cryptocompare.error: json: cannot unmarshal string into Go value of type map[string]float64 - {\"Response\":\"Error\",\"Message\":\"You are over your rate limit please upgrade your account!\",\"HasWarning\":false,\"Type\":99,\"RateLimit\":{\"calls_made\":{\"second\":1,\"minute\":1,\"hour\":32,\"day\":8122,\"month\":33471,\"total_calls\":87540},\"max_calls\":{\"second\":20,\"minute\":300,\"hour\":3000,\"day\":7500,\"month\":50000}},\"Data\":{}}"
So:
- cryptocompare: hystrix: timeout
- coingecko: token not found for symbol AGEUR
- cryptocompare proxy: You are over your rate limit
We are interested in p2.
Implementation
We should avoid requesting unsupported symbols. Possible strategies:
- request only those tokens that user owns
- filter out unsupported tokens from requests on provider basis
Notes
Consider if we need some token prices for transactions history on activity tab