CoinGecko Coin Price by IDs, Symbols, or Names API
Returns the market value of one or more coins on CoinGecko, quoted in the currencies you choose. You pass vs_currencies plus a coin identifier as ids, symbols, or names. The response is an object keyed by coin ID, with one number per target currency.
Use cases
- Show the Bitcoin rate in USD on a dashboard or in a chat bot.
- Convert a portfolio of coins into several fiat currencies with one call by listing multiple
ids and vs_currencies.
- Add 24-hour change, volume, or market cap to a ticker with the
include_* flags.
- Look up a coin by ticker with
symbols when you do not know the CoinGecko coin ID.
Request
curl -X POST "https://api.sandbase.ai/v1/api/coingecko/simple-price" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ids": "bitcoin", "vs_currencies": "usd"}'
The result is returned in outputs[0].data.
Parameters
Example response
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"bitcoin": {
"usd": 76688
}
}
Response fields
Notes
Pricing
$0.008 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.