Quick answer
Coinbase Exchange publishes free, keyless candles at api.exchange.coinbase.com (/products/BTC-USD/candles, up to 300 per request, granularities 1m to 1d) in real US dollars. Trading is a different API: Coinbase Advanced Trade, which authenticates with CDP keys that sign a JWT per request.
Coinbase Exchange API at a glance
- Pricing
- Free, no key
- Availability
- Worldwide (market data)
- Paper trading
- Not applicable (data only)
- Integration type
- Public, no key
- In AlgoGP
- Built in: data adapter (Free)
- Candles
GET https://api.exchange.coinbase.com/products/BTC-USD/candles- Bar sizes
- 1m, 5m, 15m, 1h, 6h, 1d (4h and weekly are built from these)
- Per request
- Up to 300 candles
- History
- BTC-USD from 2015; newer listings from their launch
The candles endpoint
Request /products/{product}/candles?granularity=86400&start=…&end=… with ISO-8601 start and end. granularity is in seconds and must be one of 60, 300, 900, 3600, 21600, 86400. Each row is [time, low, high, open, close, volume] — note the unusual column order — newest first.
Products use a dash: BTC-USD, ETH-USD, SOL-EUR. A window longer than 300 candles must be paged; AlgoGP’s market_data.py walks the range in 300-candle chunks and de-duplicates by timestamp.
Rate limits and caveats
- Public endpoints are limited per IP (on the order of ten requests per second); send a
User-Agentand back off on429. - Minutes with no trades produce no candle, so thin pairs have gaps rather than zero-volume bars.
- There is no 4-hour or weekly granularity; build them by aggregating 1h and 1d bars.
What about trading on Coinbase?
Placing orders goes through the Coinbase **Advanced Trade API**, authenticated with Coinbase Developer Platform keys that sign each request as a short-lived JWT. AlgoGP does not ship a Coinbase order adapter yet; pair Coinbase data with the Alpaca, Kraken or Binance broker, or extend brokers.py yourself.
Use Coinbase Exchange in AlgoGP
Open a project, go to the APIs & keys tab and, under Platforms, pick Coinbase Exchange as the market data source (market_data.py). The choice is saved to config.json as a new strategy version:
{
"platforms": {
"data": "coinbase",
"broker": "alpaca"
}
}backtest.py and live.py connect to when you run the exported code.Coinbase Exchange needs no API key: the generated code calls its public endpoints directly.
Coinbase Exchange API: frequently asked questions
Is the Coinbase price API free?
Yes. The Exchange market-data endpoints (products, candles, trades, order book) are public and free, with per-IP rate limits.
Do I need a Coinbase API key for historical data?
No. Keys are only for account data and trading. Candles need no authentication.
Why do Coinbase candles look different from Binance’s?
They are different venues: Coinbase quotes USD, Binance mostly USDT, and each has its own trades. Differences of a few basis points are normal.
Turn Coinbase Exchange data into a tested strategy
Backtest an idea in the browser, then export Python whose live loop reads candles straight from Coinbase Exchange with your own key.
- Generated Coinbase Exchange candle fetcher, closed bars only
- An AI copilot that writes and revises the rules
- Pair it with Alpaca, Binance, OANDA or another broker
Free plan, no card required.
Coinbase Exchange alternatives
- Coinbase Advanced Trade API GuideCoinbase’s trading API for spot and eligible derivatives, authenticated with CDP keys that sign a JWT per request.
- Binance API Built into AlgoGPThe largest crypto exchange by volume, with a deep public market-data API and a free spot testnet.
- Kraken API Built into AlgoGPLong-running, US-available crypto exchange with granular API key permissions and public OHLC data.
- CoinDesk Data API GuideThe renamed CryptoCompare (then CCData): crypto prices, OHLCV, order books and news across hundreds of exchanges.
Independent guide. AlgoGP is not affiliated with Coinbase Exchange. Limits, prices and availability change; confirm them in the official documentation. Nothing here is investment advice.