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 freePrice-history chart for one or more coin keys.
Parameters
| name | in | type | description | |
|---|---|---|---|---|
coins | path | str | required | Comma-separated coin keys, each `source:id` — e.g. `coingecko:ethereum`, `ethereum:0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045` example: coingecko:ethereum,coingecko:bitcoin |
start | query | int | optional | Unix timestamp (seconds) of the earliest data point to return. |
end | query | int | optional | Unix timestamp (seconds) of the latest data point (defaults to now). |
span | query | int | optional | Number of data points to return (omitting span returns only 1 point). default: 10example: 10 |
period | query | str | optional | Duration between consecutive data points (e.g. '1h', '4h', '1d', '1w'). default: 1dexample: 1d |
searchWidth | query | str | optional | Time 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"