{
  "openapi": "3.1.0",
  "info": {
    "title": "Crypto Price API",
    "version": "1.0.0",
    "description": "Live Coinbase spot prices for 400+ crypto assets in 170+ currencies, with candles and 24h stats.\n\nLive cryptocurrency prices from Coinbase: spot prices for 400+ crypto assets in 170+ fiat currencies (or in other cryptos), dated daily spot lookups, batch pricing of up to 50 symbols, crypto↔fiat and crypto↔crypto conversion, 24h statistics with bid/ask, OHLCV candle history (1 minute to 1 day, up to 300 candles) and asset/pair directories — edge-cached for 60 seconds.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/crypto-prices.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/crypto-prices"
  },
  "servers": [
    {
      "url": "https://api-crypto.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Finance",
      "description": "Crypto Price API belongs to the Finance category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/prices": {
      "get": {
        "operationId": "batchPrices",
        "summary": "Batch Prices",
        "description": "Batch Prices endpoint of the Crypto Price API. Costs 10 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/crypto-prices/batch-prices"
        },
        "parameters": [
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "USD"
          },
          {
            "name": "symbols",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "BTC,ETH,SOL"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "currency": "USD",
                  "count": 3,
                  "prices": {
                    "BTC": 77245.47,
                    "ETH": 2513.8,
                    "SOL": 101.71
                  },
                  "unsupported_symbols": [
                    "XYZ"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/convert": {
      "get": {
        "operationId": "convert",
        "summary": "Convert",
        "description": "Convert endpoint of the Crypto Price API. Costs 10 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/crypto-prices/convert"
        },
        "parameters": [
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0.5"
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "BTC"
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "EUR"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "from": "BTC",
                  "to": "EUR",
                  "amount": 0.5,
                  "rate": 66630.69,
                  "inverse_rate": 0.00001500809912,
                  "result": 33315.345
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/sources": {
      "get": {
        "operationId": "dataSources",
        "summary": "Data Sources",
        "description": "Data Sources endpoint of the Crypto Price API. Costs 10 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/crypto-prices/data-sources"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "sources": [
                    {
                      "name": "Coinbase Prices API",
                      "url": "https://docs.cdp.coinbase.com/coinbase-app/docs/api-prices",
                      "provides": "Spot prices (live and dated) and exchange-rate tables for 400+ crypto assets and 170+ fiat currencies."
                    },
                    {
                      "name": "Coinbase Exchange Market Data",
                      "url": "https://docs.cdp.coinbase.com/exchange/reference/exchangerestapi_getproducts",
                      "provides": "24h statistics, bid/ask and OHLCV candles for pairs traded on Coinbase Exchange."
                    }
                  ],
                  "cache": {
                    "prices_seconds": 60,
                    "lists_seconds": 3600
                  },
                  "attribution": {
                    "source": "Coinbase public price and exchange market data",
                    "source_url": "https://docs.cdp.coinbase.com/coinbase-app/docs/api-prices",
                    "note": "Live market data, edge-cached for up to 60 seconds. Spot prices come from Coinbase's price API; 24h statistics, bid/ask and candles come from Coinbase Exchange and exist only for pairs traded there (see /v1/pairs)."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/currencies": {
      "get": {
        "operationId": "listCurrencies",
        "summary": "List Currencies",
        "description": "List Currencies endpoint of the Crypto Price API. Costs 10 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/crypto-prices/list-currencies"
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "bit"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "crypto"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "type": "crypto",
                  "count": 5,
                  "currencies": [
                    {
                      "code": "ARB",
                      "name": "Arbitrum",
                      "color": "#12AAFF"
                    },
                    {
                      "code": "BCH",
                      "name": "Bitcoin Cash",
                      "color": "#8DC351"
                    },
                    {
                      "code": "BOBBOB",
                      "name": "BOB (Build on Bitcoin)",
                      "color": "#F25D00"
                    },
                    {
                      "code": "BTC",
                      "name": "Bitcoin",
                      "color": "#F7931A"
                    },
                    {
                      "code": "TAO",
                      "name": "Bittensor",
                      "color": "#0A0B0D"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/price/{pair}": {
      "get": {
        "operationId": "pairSpotPrice",
        "summary": "Pair Spot Price",
        "description": "Pair Spot Price endpoint of the Crypto Price API. Costs 10 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/crypto-prices/pair-spot-price"
        },
        "parameters": [
          {
            "name": "pair",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "BTC-USD"
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "pair": "BTC-USD",
                  "symbol": "BTC",
                  "currency": "USD",
                  "price": 77247.385,
                  "bid": 77249.16,
                  "ask": 77249.17,
                  "last_trade_at": "2026-09-12T06:36:46.014591103Z",
                  "stats_24h": {
                    "open": 77265.11,
                    "high": 79852.22,
                    "low": 76030,
                    "last": 77245.47,
                    "volume": 6747.76900845,
                    "volume_30d": 209324.00018318,
                    "change": -19.64,
                    "change_pct": -0.03
                  },
                  "exchange_traded": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/history/{pair}": {
      "get": {
        "operationId": "priceHistory",
        "summary": "Price History",
        "description": "Price History endpoint of the Crypto Price API. Costs 10 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/crypto-prices/price-history"
        },
        "parameters": [
          {
            "name": "pair",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "BTC-USD"
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1d"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "7"
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "pair": "BTC-USD",
                  "interval": "1d",
                  "start": "2026-09-06T00:00:00.000Z",
                  "end": "2026-09-12T00:00:00.000Z",
                  "count": 7,
                  "summary": {
                    "open": 79833.86,
                    "close": 77247.38,
                    "high": 80564.24,
                    "low": 76030,
                    "volume": 29911.93442,
                    "change": -2586.48,
                    "change_pct": -3.24
                  },
                  "candles": [
                    {
                      "time": "2026-09-06T00:00:00.000Z",
                      "open": 79833.86,
                      "high": 80564.24,
                      "low": 79250,
                      "close": 80339.13,
                      "volume": 2000.39186862
                    },
                    {
                      "time": "2026-09-07T00:00:00.000Z",
                      "open": 80339.13,
                      "high": 80462.23,
                      "low": 78666,
                      "close": 79091.97,
                      "volume": 3292.97954149
                    },
                    {
                      "time": "2026-09-08T00:00:00.000Z",
                      "open": 79091.97,
                      "high": 79477.07,
                      "low": 77589,
                      "close": 78447.11,
                      "volume": 5149.1413426
                    },
                    {
                      "time": "2026-09-09T00:00:00.000Z",
                      "open": 78449.28,
                      "high": 79752.73,
                      "low": 77727,
                      "close": 78283.98,
                      "volume": 5255.8427141
                    },
                    {
                      "time": "2026-09-10T00:00:00.000Z",
                      "open": 78283.98,
                      "high": 78554.18,
                      "low": 76440,
                      "close": 76536.55,
                      "volume": 6390.76117588
                    },
                    {
                      "time": "2026-09-11T00:00:00.000Z",
                      "open": 76536.55,
                      "high": 79852.22,
                      "low": 76030,
                      "close": 77208.55,
                      "volume": 7310.99918713
                    },
                    {
                      "time": "2026-09-12T00:00:00.000Z",
                      "open": 77208.55,
                      "high": 77372.86,
                      "low": 77152.54,
                      "close": 77247.38,
                      "volume": 511.81858622
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/pairs": {
      "get": {
        "operationId": "tradingPairs",
        "summary": "Trading Pairs",
        "description": "Trading Pairs endpoint of the Crypto Price API. Costs 10 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/crypto-prices/trading-pairs"
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "BTC"
          },
          {
            "name": "quote",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "EUR"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "count": 1,
                  "pairs": [
                    {
                      "pair": "BTC-EUR",
                      "base": "BTC",
                      "quote": "EUR",
                      "status": "online"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 10 tokens per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}