GET /coins/markets
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/coingecko/coins/marketsCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeRanked market rows with price, market cap, volume and change.
Parameters
| name | in | type | description | |
|---|---|---|---|---|
vs_currency | query | str | required | Quote currency for price and market cap. default: usdexample: usd |
ids | query | str | optional | Comma-separated coin ids to limit the result to. example: bitcoin,ethereum |
category | query | str | optional | Category slug to filter by. example: layer-1 |
order | query | strmarket_cap_desc | market_cap_asc | gecko_desc | gecko_asc | volume_desc | volume_asc | id_asc | id_desc | optional | Sort order for the returned rows. default: market_cap_descexample: market_cap_desc |
per_page | query | int | optional | Rows per page (max 250). default: 100example: 100 |
page | query | int | optional | Page number, 1-based. default: 1example: 1 |
sparkline | query | bool | optional | Include a 7-day sparkline array (large). default: Falseexample: False |
price_change_percentage | query | str | optional | Comma-separated change windows to include. example: 1h,24h,7d |
Response
type: array
pagination: none
sample: {
"[0]": "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/coins/markets?vs_currency=usd&ids=bitcoin%2Cethereum&category=layer-1&order=market_cap_desc&per_page=100&page=1&sparkline=False&price_change_percentage=1h%2C24h%2C7d"