This issue is to replace the CoinGecko API on the TokenRates controller. The API should be replaced with the public PriceAPI written by the codefi team which is documented here.
Scenario
GIVEN a user has an account and assets in their wallet
WHEN they navigate to the wallet view
AND they review their assets
AND they have a network connection
THEN there is a fiat balance displayed
Design
No response
Technical Details
Create a TokenRatesController patch that replaces the CoinGecko API
- Create a core PR that applies these changes to the TokenRatesController
- Test the API calls and confirm data objects have the same format as what CoinGecko returns
### Data flow
![image](https://github.com/MetaMask/metamask-mobile/assets/46944231/c3f5fd73-4e99-4588-bb1d-d944d8796a47)
### Threat Modeling Framework
This is a public API and does not require an API token.
### Acceptance Criteria
Token rates are displaying with the new API integration when there is a network connection.
### References
Slack - https://consensys.slack.com/archives/C065W3877E3/p1700574338429709
What is this about?
This issue is to replace the CoinGecko API on the TokenRates controller. The API should be replaced with the public PriceAPI written by the codefi team which is documented here.
Scenario
Design
No response
Technical Details
getTokenPriceURL
to uses the PriceAPI call GET /v1/chains/{chainId}/spot-prices/{tokenAddress}getSupportedVsCurrencies
this should not be neededgetPlatformsURL