Skip to content

[assets-controllers] Fetch token rates in batches to avoid hitting limits #3573

@Gudahtt

Description

@Gudahtt

We currently fetch the token rates for all tokens (for a given network) in a single call. However, the CoinGecko API we're currently using supports a maximum of 10 token addresses in a single request. Beyond that, it throws an error. The price API that we're considering migrating to has a similar limit of 15 addresses.

We should update the TokenRatesController to batch requests by a configurable amount (10 for now) to avoid hitting this error.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingteam-wallet-frameworkDeprecated: Please use `team-core-platform` instead.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions