Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt the balancer-sdk SOR to not use coingecko requests #563

Closed
lgahdl opened this issue Jan 23, 2024 · 0 comments · Fixed by #564
Closed

Adapt the balancer-sdk SOR to not use coingecko requests #563

lgahdl opened this issue Jan 23, 2024 · 0 comments · Fixed by #564
Assignees

Comments

@lgahdl
Copy link
Contributor

lgahdl commented Jan 23, 2024

The frontend team cannot use Coingecko API Key without exposing it, so we need to find another way to fetch token prices for the SOR functionality.

Franz suggested to use the API:
the API does not offer a “getPriceForToken” option but rather gives you all token prices for a specific (or multiple) chains. I assume you only need current and not historical prices?
the return value for “getCurrentTokenPrices” are price and contract address
{
tokenGetCurrentPrices(chains: [MAINNET]) {
address
price
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants