CoinBase Currencies

Cryptocurrency API · Works globally · CoinBase · Real-time exchange rates

TL;DR

The CoinBase Currencies API (part of CoinBase Exchange API) provides real-time cryptocurrency exchange rates and prices for Bitcoin, Ethereum, Solana, Litecoin, and 100+ other cryptocurrencies. Public endpoints require no authentication for price lookups, exchange rate queries, and currency metadata. Data includes spot prices, buy/sell prices, volume, and supported fiat currencies (USD, EUR, GBP, JPY, etc.). Responses are in JSON format with support for multiple currency conversions. The API updates in real time as trades occur on CoinBase Exchange.

Quick start: https://api.coinbase.com/v2/prices/BTC-USD/spot

No API key needed — just make a request!

How to Use This API

1. Get BTC Spot Price in USD

https://api.coinbase.com/v2/prices/BTC-USD/spot

Returns current market price of Bitcoin in US dollars.

2. Get ETH Spot Price

https://api.coinbase.com/v2/prices/ETH-USD/spot

3. Get Buy Price (Includes Fees)

https://api.coinbase.com/v2/prices/BTC-USD/buy

Buy price includes CoinBase fees. Use /spot for the raw market rate.

4. Get Sell Price

https://api.coinbase.com/v2/prices/BTC-USD/sell

5. List All Supported Currencies

https://api.coinbase.com/v2/currencies

Returns list of supported fiat and crypto currencies with IDs, names, and smallest denominations.

6. Get Exchange Rates for BTC

https://api.coinbase.com/v2/exchange-rates?currency=BTC

Returns BTC exchange rates against all supported fiat and crypto currencies.

7. Get Price in Different Fiat

https://api.coinbase.com/v2/prices/BTC-EUR/spot
https://api.coinbase.com/v2/prices/ETH-GBP/spot

8. Response Format

{
  "data": {
    "base": "BTC",
    "currency": "USD",
    "amount": "67432.50"
  }
}

Prices are returned as decimal strings to preserve precision. The data wrapper contains base, currency, and amount fields.

9. JavaScript — Monitor Multiple Crypto Prices

async function getPrices() {
  const coins = ['BTC-USD', 'ETH-USD', 'SOL-USD'];
  for (const pair of coins) {
    const resp = await fetch(`https://api.coinbase.com/v2/prices/${pair}/spot`);
    const data = await resp.json();
    console.log(`${pair}: \$${parseFloat(data.data.amount).toFixed(2)}`);
  }
}
getPrices();

10. Python — Fetch and Compare Prices

import requests

coins = ['BTC', 'ETH', 'SOL', 'LTC', 'ADA']
for coin in coins:
    resp = requests.get(f'https://api.coinbase.com/v2/prices/{coin}-USD/spot')
    price = float(resp.json()['data']['amount'])
    print(f"{coin}/USD: \${price:,.2f}")

11. Python — BTC Exchange Rates to All Currencies

import requests

resp = requests.get('https://api.coinbase.com/v2/exchange-rates?currency=BTC')
rates = resp.json()['data']['rates']
# Show top 10 fiat rates
fiats = ['USD', 'EUR', 'GBP', 'JPY', 'CAD', 'AUD', 'CHF', 'CNY', 'INR', 'BRL']
print("BTC Exchange Rates:")
for fiat in fiats:
    print(f"  {fiat}: {rates[fiat]}")
Try it: https://api.coinbase.com/v2/prices/BTC-USD/spot

Frequently Asked Questions

What cryptocurrency trading pairs are available?
BTC-USD, ETH-USD, SOL-USD, LTC-USD, BCH-USD, ADA-USD, DOT-USD, LINK-USD, MATIC-USD, SHIB-USD, DOGE-USD, and many more. Use the /v2/currencies endpoint for a full list of supported crypto and fiat assets.
What's the difference between spot, buy, and sell prices?
/spot is the current market price. /buy includes CoinBase's buy-side fees and spread (higher than spot). /sell includes sell-side fees (lower than spot). Use /spot when you need the raw market rate.
How often are prices updated?
Prices update in real-time as trades occur on CoinBase Exchange. The typical delay is less than a few seconds from the trade to the API response. For true real-time data, use the CoinBase WebSocket feed.
Can I get historical prices through this public API?
The public v2 API does not provide historical price data. For historical data, you will need the authenticated CoinBase Pro/Advanced Trade API or a third-party provider.
Do I need an API key for any of these endpoints?
No. All price, currency list, and exchange rate endpoints shown here are fully public and require no authentication. An API key is only needed for trading, account balances, and transaction history.
What fiat currencies are supported for conversion?
USD, EUR, GBP, JPY, CAD, AUD, CHF, CNY, INR, BRL, MXN, SGD, HKD, NZD, KRW, and many more. Exchange rates are available for all supported fiat pairs via the /exchange-rates endpoint.

What You Can Build