-
Notifications
You must be signed in to change notification settings - Fork 31
market data api fix #1690
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
base: master
Are you sure you want to change the base?
market data api fix #1690
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the CoinGecko API call to always request prices in USD currency, ensuring consistent results regardless of input parameters.
- Modifies URL construction to explicitly set
vs_currenciesto "usd" - Filters input arguments to only include
idsparameter
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| } | ||
|
|
||
| const url = 'https://api.coingecko.com/api/v3/simple/price?' + new URLSearchParams(args) | ||
| const url = 'https://api.coingecko.com/api/v3/simple/price?' + new URLSearchParams({ids: args.ids, vs_currencies: "usd"} ) |
Copilot
AI
Oct 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing closing parenthesis in URLSearchParams constructor call. The line should end with }) instead of } ).
| const url = 'https://api.coingecko.com/api/v3/simple/price?' + new URLSearchParams({ids: args.ids, vs_currencies: "usd"} ) | |
| const url = 'https://api.coingecko.com/api/v3/simple/price?' + new URLSearchParams({ids: args.ids, vs_currencies: "usd"}) |
|
Running Lighthouse audit... |
This pull request makes a small change to the API call in the
coingeckofunction to ensure it always requests prices in USD, regardless of the input arguments.coingeckofunction inapi/market_data.jsnow constructs the request URL using only theidsfrom the input arguments and setsvs_currenciesto"usd"explicitly, ensuring consistent currency results.