How to hit the Coinbase (public prices) API

Coinbase's public endpoints at https://api.coinbase.com/v2 return crypto prices and exchange rates. Trading and account data use separate, authenticated APIs.

Authentication

None — no key, no signup. Every example runs as-is.

Full reference: https://docs.cdp.coinbase.com/coinbase-app/api-architecture/rest-api

Spot price

curl https://api.coinbase.com/v2/prices/BTC-USD/spot
Run in PostTaco
Example response (trimmed)
{
  "data": {
    "amount": "84343.905",
    "base": "BTC",
    "currency": "USD"
  }
}

Exchange rates for a currency

Every rate is relative to currency.

curl "https://api.coinbase.com/v2/exchange-rates?currency=ETH"
Run in PostTaco
Example response (trimmed)
{
  "data": {
    "currency": "ETH",
    "rates": {
      "00": "190996.42857142857150497",
      "1INCH": "27318.6554965263586865",
      "2Z": "52803.12006319115327572",
      "A8": "461025.862068965517342805",
      "AAVE": "19.333020027474497785",
      "ABT": "10352.10994967092516598",
      "ACH": "482140.28128380814994031",
      "ACS": "16556965.944272445820376315",
      "ACX": "57455.57743560858735303",
      "ADA": "11235.9550561797752809",
      "AED": "9821.2846525",
      "AERGO": "280729.658792650918617625",
      "AERO": "3987.3398845826932566",
      "AFN": "169127.33482605",
      "AGLD": "13018.257059396299899765"
    }
  }
}