Coinbase candles

GET https://api.api.sh/coinbase/v1/candles
1 credit / call finance & crypto try it in the playground →

Price candles (open, high, low, close, volume) of a Coinbase Exchange pair, oldest first, up to 300 a call. Without dates you get the latest 300. To page back, pass next_end as end; null when there is no earlier page.

Every response includes credits_used: the credits this call cost.

Parameters

nametypedescription
pairrequired string Trading pair as BASE-QUOTE. Example: BTC-USD
granularity 1m | 5m | 15m | 1h | 6h | 1d Candle size: 1m, 5m, 15m, 1h, 6h or 1d (default), or the same in seconds. Example: 1d
start string Start time, ISO date or unix time.
end string End time, ISO date or unix time.

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/coinbase/v1/candles?pair=BTC-USD" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.