Coinbase Pro API

Cryptocurrency / API Key Intermediate HTTPS
88 A
Measured Score 0 50 100 Speed 28/30 Consistency 17/20 Security 20/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

Overview

Coinbase Advanced Trade (formerly Coinbase Pro) provides institutional-grade REST and WebSocket APIs for trading on the Coinbase exchange. It supports placing, cancelling, and querying orders, as well as fetching real-time order book snapshots and historical candle data. An API key with appropriate permissions is required for all private endpoints.

Beginner Tip

Public market-data endpoints like /products/{product_id}/ticker require no authentication — try GET https://api.exchange.coinbase.com/products/BTC-USD/ticker to see the live BTC/USD order book top before setting up API keys.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://api.exchange.coinbase.com/products/BTC-USD/ticker
Result
HTTP 200 · application/json · 186 bytes · compressed
Response time
37 ms (median of 3) · fastest 34 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Google Trust Services
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Served by
cloudflare
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
ask string 63949.89
bid string 63949.88
volume string 5873.3201064
trade_id integer 1068939092
price string 63949.88
size string 0.00000007
time string (date) 2026-08-10T19:49:31.113231273Z
rfq_volume string 133.258251

Captured Response

Captured from a real request to https://api.exchange.coinbase.com/products/BTC-USD/ticker on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "ask": "63949.89",
  "bid": "63949.88",
  "volume": "5873.3201064",
  "trade_id": 1068939092,
  "price": "63949.88",
  "size": "0.00000007",
  "time": "2026-08-10T19:49:31.113231273Z",
  "rfq_volume": "133.258251"
}

Field Reference

trade_id Unique ID of the most recent trade on this market.
price Last traded price for the product.
size Quantity of the asset traded in the most recent trade.
bid Highest current buy offer in the order book.
ask Lowest current sell offer in the order book.
volume Total trading volume in the base currency over the past 24 hours.

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://docs.pro.coinbase.com/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist application/json
{
  "message": "Route not found"
}

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

400 Invalid product_id Requesting a market pair that is not listed on Coinbase Exchange
Fetch /products first to get the current list of valid product IDs such as BTC-USD or ETH-BTC.
401 Unauthorized on trading endpoints API key missing required trade permission scope
Regenerate your API key with the correct permission scope (view, trade, or transfer) for the actions you need.
Timestamp too far from server time System clock drift causes the CB-ACCESS-TIMESTAMP header to be rejected
Sync your system clock via NTP and generate the timestamp immediately before each request.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 28/30
Consistency 17/20
Security 20/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 37ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Cryptocurrency
Difficulty Intermediate
Endpoint last called: 2026-08-10

Alternatives to Coinbase Pro

Technical alternatives for different use cases.

Advanced trading API with lower fees than Coinbase

Better For

Global market access and altcoin variety

Trade-off

Professional trading bots with limit orders

Similar APIs

View All →