safe-transaction-service icon indicating copy to clipboard operation
safe-transaction-service copied to clipboard

Improve our retrieve prices for tokens

Open moisses89 opened this issue 2 years ago • 0 comments

What is needed?

Our current solution to retrieve the prices is returning 0.0 values when cannot get the price.
The 0.0 price is an acceptable value when we don't know the real price but it is weird for an user that suddenly pass from 1700$ to 0$ several times in the same day. For this I would like to research solutions that keep an acceptable value without back to 0 with each error.

We have two things to improve here:

  • We shoudln't have any errors when connecting to the nodes to retrieve the pricing
  • If some error happens we should keep old value if price cannot be calculated, it's better than nothing

Related issues

https://github.com/safe-global/safe-transaction-service/issues/311

Endpoint

https://safe-transaction.mainnet.gnosis.io/api/v1/tokens/<token-address>/prices/usd/

moisses89 avatar Aug 08 '22 11:08 moisses89