GET /simple/token_price/{id}
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/coingecko/simple/token_price/{id}Cache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeSpot price, market cap and 24h metrics for ERC-20/SPL token contracts on one asset platform.
Parameters
| name | in | type | description | |
|---|---|---|---|---|
id | path | str | required | Asset platform id (from /asset_platforms), e.g. ethereum, solana, base. default: ethereumexample: ethereum |
contract_addresses | query | str | required | Comma-separated token contract addresses. example: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 |
vs_currencies | query | str | required | Comma-separated quote currencies. default: usdexample: usd |
include_market_cap | query | bool | optional | Include market cap per token. default: Falseexample: True |
include_24hr_vol | query | bool | optional | Include 24h volume per token. default: Falseexample: True |
include_24hr_change | query | bool | optional | Include 24h percentage change per token. default: Falseexample: True |
include_last_updated_at | query | bool | optional | Include unix timestamp of the last price update. default: Falseexample: False |
Response
type: object
pagination: none
sample: {
"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "object"
}
Safe request
Reads the credential from API_HUB_KEY; it never appears in the URL.
curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/coingecko/simple/token_price/ethereum?contract_addresses=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&vs_currencies=usd&include_market_cap=True&include_24hr_vol=True&include_24hr_change=True&include_last_updated_at=False"