diff --git a/apps/website/src/app/demos/dashboard-trade/utils/getPrices.ts b/apps/website/src/app/demos/dashboard-trade/utils/getPrices.ts index 9cd6fe7..370cd7a 100644 --- a/apps/website/src/app/demos/dashboard-trade/utils/getPrices.ts +++ b/apps/website/src/app/demos/dashboard-trade/utils/getPrices.ts @@ -4,9 +4,20 @@ function getPrices(setPrices: unknown) { const domain = process.env.NEXT_PUBLIC_COINGECKO_DOMAIN const key = process.env.NEXT_PUBLIC_COINGECKO_API_KEY + const url = `${domain}/simple/price` + + const coingeckoIds = ['bitcoin,chainlink,cosmos,solana'] + const options = { method: 'GET', - url: `${domain}/simple/price?ids=bitcoin&vs_currencies=usd`, + url, + params: { + ids: coingeckoIds.join(','), + vs_currencies: 'btc,usd,eth', + include_24hr_change: true, + include_7d_change: true, + include_last_updated_at: true, + }, headers: { accept: 'application/json', 'x-cg-demo-api-key': key, @@ -16,7 +27,7 @@ function getPrices(setPrices: unknown) { axios .request(options) .then(function (response) { - console.log('prices ...', response.data) + console.log('prices ......', response.data) }) .catch(function (error) { console.error('prices ...', error)