Get current prices for assets
GET
/asset-prices
const url = 'http://localhost:8000/api/v1/asset-prices?ids=bitcoin%2Cethereum&vs_currency=usd';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:8000/api/v1/asset-prices?ids=bitcoin%2Cethereum&vs_currency=usd' \ --header 'Authorization: Bearer <token>'Returns current CoinGecko prices for the given coin ids in the requested fiat currency, so clients value holdings against the same feed the server uses.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” ids
required
string
Example
bitcoin,ethereumComma-separated CoinGecko coin ids.
vs_currency
string
Example
usdResponses
Section titled “ Responses ”Prices retrieved
Media type application/json
object
data
object
vs_currency
string
prices
object
Example
{ "data": { "vs_currency": "usd", "prices": { "bitcoin": 65000, "ethereum": 3200 } }}Unauthenticated
Validation error