Skip to content

Commit

Permalink
updates pro-api
Browse files Browse the repository at this point in the history
  • Loading branch information
FlacoJones committed Mar 30, 2023
1 parent 3e21e8b commit 86a94e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fetchCoingeckoPrices.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const fetchCoingeckoPrices = async (pricingMetadata) => {
const network = 'polygon-pos';
const commaDelimitedTokenAddresses = pricingMetadata.map((metadata) => metadata.address).join(',');

let url = `https://api.coingecko.com/api/v3/simple/token_price/${network}?contract_addresses=${commaDelimitedTokenAddresses}&vs_currencies=usd`;
let url = `https://pro-api.coingecko.com/api/v3/simple/token_price/${network}?contract_addresses=${commaDelimitedTokenAddresses}&vs_currencies=usd`;
if (process.env.COINGECK_API_KEY) {
url = `${url}&x_cg_pro_api_key=${process.env.COINGECK_API_KEY}`;
}
Expand Down

0 comments on commit 86a94e1

Please sign in to comment.