historic: Get historic prices

API: coinbase.com:coinbase
Endpoint: /prices/{currency_pair}/historic
Response format: application/json
Auth: none
Method: GET
Last Status: 200
Latency: 252ms

Description

Gets historic price data for a currency pair. Useful for charts and price history analysis.

Parameters (2)

currency_pair (string, path, required)

Currency pair in the format BASE-CURRENCY (e.g., BTC-USD)

days (integer, query, optional)

Number of days of historical data to retrieve

Examples (1)

Get historic prices openapi-spec
curl 'https://api.coinbase.com/v2/prices/BTC-USD/historic?days=1'
import requests

resp = requests.get(
    "https://api.coinbase.com/v2/prices/BTC-USD/historic",
    params={
        'days': '1',
    },
)
data = resp.json()
import zingu_apis

api = zingu_apis.api("coinbase")
result = api.fetch("prices/{currency_pair}/historic", days=1)

for item in result:
    print(item)
const resp = await fetch("https://api.coinbase.com/v2/prices/BTC-USD/historic?days=1");
const data = await resp.json();

Probe History

Latency

Status Codes

TimeStatusLatencySize
2026-04-16 02:43:57.928004 200 252ms
2026-04-15 00:40:09.541823 200 791ms
2026-04-14 03:01:08.477884 200 584ms
2026-04-12 15:18:53.983400 200 295ms
2026-04-10 06:47:35.161011 200 188ms
2026-04-09 00:36:32.438847 200 236ms
2026-04-08 00:26:10.181812 200 593ms
2026-04-07 01:26:33.325171 200 776ms
2026-04-05 20:04:41.192877 200 656ms
2026-04-05 01:04:32.800222 200 313ms
2026-04-04 02:14:46.752566 200 246ms
2026-04-03 12:53:20.798599 200 260ms
2026-03-30 12:01:09.657706 ERR