# Crypto price API

> Live quotes, OHLCV history and coin profiles for Bitcoin, Ethereum and other cryptocurrencies, in USD, EUR or BTC, over the same API key as stocks.

Canonical page: https://stockdataapi.com/crypto-api

- Symbol format: `BTC-USD`: the coin, a hyphen, the currency it is priced in
- Trading hours: Around the clock, weekends included
- Quote freshness: About a minute, at any hour
- Daily history: From each coin's first day at the source: `BTC-USD` from September 2014
- Intraday bars: 1-minute for 7 days, up to 90-minute for 59 days, hourly for 729 days

## Symbol format

A coin is its ticker, a hyphen and the currency it is priced in: `BTC-USD` is bitcoin in US dollars and `BTC-EUR` the same coin in euros. The quote side can be another coin, as in `ETH-BTC`. Stablecoins and tokens follow the same pattern.

| Symbol | What it is |
| --- | --- |
| `BTC-USD` | Bitcoin in US dollars |
| `ETH-USD` | Ether in US dollars |
| `SOL-USD` | Solana in US dollars |
| `USDT-USD` | Tether in US dollars |
| `BTC-EUR` | Bitcoin in euros |
| `ETH-BTC` | Ether priced in bitcoin |

## Endpoints

- [Quote API](https://stockdataapi.com/docs/quote.md), `GET /v6/finance/quote`: Price, change, volume, market cap and circulating supply, batched with stocks or currencies in the same call if you like.
- [Chart API: OHLCV history](https://stockdataapi.com/docs/chart.md), `GET /v8/finance/chart/{symbol}`: Daily, weekly and monthly OHLCV back to the coin's first day, plus intraday bars. A daily bar starts at 00:00 UTC.
- [Spark API: close-price series](https://stockdataapi.com/docs/spark.md), `GET /v8/finance/spark`: Close-only series for a watchlist of coins.
- [Fundamentals API (quoteSummary)](https://stockdataapi.com/docs/fundamentals.md), `GET /v11/finance/quoteSummary/{symbol}`: `price`, `summaryDetail` (market cap, circulating and max supply, all-time high and low) and `assetProfile` (description, website, whitepaper).
- [Screener API](https://stockdataapi.com/docs/screeners.md), `GET /ws/screeners/v1/finance/screener/predefined/saved`: `scrIds=all_cryptocurrencies_us` lists coins quoted in US dollars, largest market cap first.
- [Search API](https://stockdataapi.com/docs/search.md), `GET /v1/finance/search`: Find a coin's symbol from its name.

## Example request

```bash
curl -H "x-api-key: $KEY" "https://api.stockdataapi.com/v6/finance/quote?symbols=BTC-USD,ETH-USD,BTC-EUR"
```

## Example response

```json
{
  "quoteResponse": {
    "result": [
      {
        "symbol": "BTC-USD",
        "shortName": "Bitcoin USD",
        "quoteType": "CRYPTOCURRENCY",
        "currency": "USD",
        "fromCurrency": "BTC",
        "marketState": "REGULAR",
        "regularMarketPrice": 75803.57,
        "regularMarketChangePercent": 0.1989,
        "regularMarketVolume": 26833031168,
        "marketCap": 1524237860864,
        "circulatingSupply": 20108684,
        "regularMarketTime": 1794024434
      }
    ],
    "error": null
  }
}
```

## Good to know

- Crypto never closes, so a quote's `marketState` reads `REGULAR` at any hour and the one-minute refresh window always applies.
- Volume is a traded value, not a number of coins: for `BTC-USD` it is in US dollars.
- A daily bar runs from 00:00 UTC, and the bar for the day in progress is drawn from the live quote, so the last candle tracks the market.

## Questions

### Which cryptocurrencies can I get prices for?

Any coin or token the source quotes, in US dollars and other currencies. A symbol nobody has asked for before is fetched on the first request, and the search endpoint finds a coin's symbol from its name.

### Does crypto data update on weekends?

Yes. Crypto trades around the clock, so a quote older than about a minute is refreshed whenever you ask, weekends included. Daily bars roll over at 00:00 UTC.

### How far back does crypto price history go?

To each coin's first day at the source: September 2014 for Bitcoin (`BTC-USD`) and November 2017 for Ether (`ETH-USD`). Intraday bars cover the last 7 days at one minute and about two years at one hour.

### Can I get crypto prices in euros or in bitcoin?

Yes. Change the currency in the symbol: `BTC-EUR` prices bitcoin in euros and `ETH-BTC` prices ether in bitcoin.

### Is crypto data included in the free plan?

Yes. Every plan includes every endpoint and every market, with full history.