> ## Documentation Index
> Fetch the complete documentation index at: https://docs.marketdataset.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /crypto/prices

> Historical OHLCV candlestick data for cryptocurrencies

## Endpoint

```
GET https://api.marketdataset.ai/crypto/prices
```

## Parameters

| Name                  | Type    | Required | Description                                                |
| --------------------- | ------- | -------- | ---------------------------------------------------------- |
| `symbol`              | string  | Yes      | Crypto symbol, e.g. `BTC`, `ETH`, `SOL`                    |
| `quote`               | string  | No       | Quote currency (default: `USDT`)                           |
| `interval`            | string  | No       | `minute`, `hour`, `day`, `week`, `month` (default: `hour`) |
| `interval_multiplier` | integer | No       | e.g. `4` for 4-hour candles (default: `1`)                 |
| `start_date`          | string  | No       | ISO 8601 date                                              |
| `end_date`            | string  | No       | ISO 8601 date                                              |
| `exchange`            | string  | No       | Exchange (default: `binance`)                              |
| `limit`               | integer | No       | Candles to return (default: `100`, max: `5000`)            |
| `cursor`              | string  | No       | Pagination cursor                                          |

## Credit cost

**\$0.005** per request

## Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.marketdataset.ai/crypto/prices?symbol=BTC&interval=day&limit=7" \
    -H "X-API-KEY: sk_your_key"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.marketdataset.ai/crypto/prices",
      params={"symbol": "BTC", "interval": "day", "limit": 7},
      headers={"X-API-KEY": "sk_your_key"},
  )
  print(response.json())
  ```
</CodeGroup>

## Example response

```json theme={null}
{
  "crypto_prices": [
    {
      "symbol": "BTC",
      "quote": "USDT",
      "interval": "day",
      "interval_multiplier": 1,
      "open": 67234.5,
      "high": 68901.2,
      "low": 66543.8,
      "close": 68201.4,
      "volume": 23847.91,
      "time": "2024-11-01T00:00:00+00:00",
      "exchange": "binance"
    }
  ],
  "next_page_url": null,
  "meta": {
    "request_id": "req_abc123",
    "credits_used": 0.005,
    "credits_remaining": 49.995
  }
}
```
