Coinbase API
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.
Available Data
Example 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
data.base The cryptocurrency symbol (e.g., BTC). data.currency The fiat currency the price is quoted in (e.g., USD). data.amount Current spot price as a decimal string — parse to float before arithmetic. Implementation Example
const url = "https://developers.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
Matrix Score Breakdown
Partially tested on Apr 5, 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 →Alchemy Ethereum
Alchemy Ethereum provides programmatic access to ethereum node-as-a-service provider via REST API.
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.