GET /coins/chart/{coins}

Auth X-Hub-Key from API_HUB_KEYExecute GET /run/defillama/coins/chart/{coins}Cache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing free

Price-history chart for one or more coin keys.

Parameters

nameintypedescription
coinspathstrrequiredComma-separated coin keys, each `source:id` — e.g. `coingecko:ethereum`, `ethereum:0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045`
example: coingecko:ethereum,coingecko:bitcoin
startqueryintoptionalUnix timestamp (seconds) of the earliest data point to return.
endqueryintoptionalUnix timestamp (seconds) of the latest data point (defaults to now).
spanqueryintoptionalNumber of data points to return (omitting span returns only 1 point).
default: 10
example: 10
periodquerystroptionalDuration between consecutive data points (e.g. '1h', '4h', '1d', '1w').
default: 1d
example: 1d
searchWidthquerystroptionalTime range on either side to search for price data (e.g. '600' or '4h').
example: 600

Response

type: object
pagination: none
sample: {
  "coins": "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/defillama/coins/chart/coingecko:ethereum,coingecko:bitcoin?span=10&period=1d&searchWidth=600"