Coinbase Pro API

Cryptocurrency / API Key Intermediate HTTPS
Varies by plan (check documentation)

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.

Available Data

coin price in USD/EUR
market capitalization
24h price change
trading volume
circulating supply
stock price and symbol

Example Response

JSON Response
{
  "id": "bitcoin",
  "symbol": "btc",
  "current_price": 65432.1,
  "market_cap": 1280000000000,
  "price_change_24h": 1250.5,
  "price_change_percentage_24h": 1.95,
  "total_volume": 28500000000
}

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

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.

Common Errors & Troubleshooting

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.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Cryptocurrency
Difficulty Intermediate
Verified: 2026-04-07

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 →