Overview
The Coinbase API exposes current and historical prices for Bitcoin, Bitcoin Cash, Litecoin, and Ethereum against major fiat currencies. Public price endpoints require no authentication, making it easy to embed live crypto prices in any app. The authenticated endpoints allow you to manage wallets, send funds, and access account data.
Beginner Tip
The spot price endpoint is completely public — try curl https://api.coinbase.com/v2/prices/BTC-USD/spot to get the current Bitcoin price with no API key needed.
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.coinbase.com/v2/prices/BTC-USD/spot
- Result
- HTTP 200 · application/json · 61 bytes · compressed
- Response time
- 40 ms (median of 3) · fastest 39 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 |
|---|---|---|
| amount | string | 63937.525 |
| base | string | BTC |
| currency | string | USD |
Captured Response
Captured from a real request to https://api.coinbase.com/v2/prices/BTC-USD/spot on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.
{
"data": {
"amount": "63937.525",
"base": "BTC",
"currency": "USD"
}
} Implementation Example
Calls a real endpoint of this API. Replace any placeholder credentials with your own key.
const url = "https://api.coinbase.com/v2/prices/BTC-USD/spot";
// 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.
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.
Measured Score Breakdown
Live HTTP request to the API endpoint
Fully tested on Aug 10, 2026
Technical Specifications
Related Tags
Alternatives to Coinbase
Technical alternatives for different use cases.
Largest exchange by volume with most trading pairs
Access to widest range of altcoins and trading pairs
US regulatory compliance (limited in some states)
Read-only market data without exchange account needed
Price tracking without needing an exchange account
Executing actual trades and managing portfolios
US-regulated exchange with strong institutional focus
Institutional-grade API with SOC 2 compliance
Number of supported cryptocurrencies
Recipes Using Coinbase
Build something with this API. Each recipe includes step-by-step instructions and code outlines.
Similar APIs
View All →Binance
⭐ Beginner's PickBinance Spot API provides real-time and historical market data for thousands of cryptocurrency trading pairs on the world's largest crypto exchange by volume.
BitcoinAverage
BitcoinAverage aggregates price data from dozens of global cryptocurrency exchanges to produce weighted average prices for Bitcoin and other digital assets.
Bitfinex
Bitfinex is a professional cryptocurrency exchange offering one of the most comprehensive trading APIs for both spot and margin markets.
Bitmex
BitMEX is a derivatives exchange specializing in perpetual swaps and futures contracts for Bitcoin and other cryptocurrencies.
1inch
⭐ Beginner's Pick1inch is a decentralized exchange (DEX) aggregator that finds the best swap routes across protocols like Uniswap, SushiSwap, and Curve.