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 free

Ranked market rows with price, market cap, volume and change.

Parameters

nameintypedescription
vs_currencyquerystrrequiredQuote currency for price and market cap.
default: usd
example: usd
idsquerystroptionalComma-separated coin ids to limit the result to.
example: bitcoin,ethereum
categoryquerystroptionalCategory slug to filter by.
example: layer-1
orderquerystr
market_cap_desc | market_cap_asc | gecko_desc | gecko_asc | volume_desc | volume_asc | id_asc | id_desc
optionalSort order for the returned rows.
default: market_cap_desc
example: market_cap_desc
per_pagequeryintoptionalRows per page (max 250).
default: 100
example: 100
pagequeryintoptionalPage number, 1-based.
default: 1
example: 1
sparklinequerybooloptionalInclude a 7-day sparkline array (large).
default: False
example: False
price_change_percentagequerystroptionalComma-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"