curl -X GET "https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv?window=day&from=20191001&limit=2" \
-H "Authorization: Bearer <YOUR_API_KEY>"fetch("https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv?window=day&from=20191001&limit=2", { headers: { "Authorization": "Bearer <YOUR_API_KEY>"} })
.then(response => response.json())
.then(data => console.log(data))require('axios')
.get("https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv?window=day&from=20191001&limit=2", { headers: { Authorization: 'Bearer <YOUR_API_KEY>' } })
.then(response => console.log(response))require 'net/http'
uri = URI("https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv?window=day&from=20191001&limit=2")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer <YOUR_API_KEY>"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.bodyimport requests
headers = {'Authorization': 'Bearer <YOUR_API_KEY>'}
url = "https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv?window=day&from=20191001&limit=2"
print(requests.get(url, headers=headers).json())<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv")
.header("Authorization", "Bearer <token>")
.asString();{
"status": {
"code": 200,
"message": "success"
},
"result": {
"window": "day",
"data": [
{
"date": "2026-06-14",
"open": 64393.87,
"high": 65753.52,
"low": 63628.02,
"close": 65704.89,
"volume": 25241.79
},
{
"date": "2026-06-13",
"open": 63541.16,
"high": 64723.5,
"low": 63393.29,
"close": 64377.53,
"volume": 18332.87
}
]
}
}Price OHLCV
This endpoint returns metrics related to BTC price. We provide two types of price, CryptoQuant’s BTC Index Price and USD or USDT price of BTC of global exchanges.
Price OHLCV data consists of five metrics.
open, the opening price at the beginning of the window, close, USD closing price at the end of the window,
high, the highest USD price in a given window, low, the lowest USD price in a given window,
and volume, the total volume traded in a given window.
At this endpoint, metrics are calculated by Minute, Hour and Day.
BTC Index Price is calculated by taking VWAP(Volume Weighted Average Price) of BTC price data aggregated from all exchanges we provide. The exchanges we provide are as follows.
Supported Exchanges By Market
| Name | Market | Supported Exchanges |
|---|---|---|
| Spot | spot | All Exchange*, Binance, Binance US, Bitfinex, Bittrex, Coinbase Advanced, FTX**, Gemini, HTX Global, Kraken, OKX |
| Perpetual | perpetual | All Exchange*, Binance, Bitmex, Bybit, Deribit, FTX**, HTX Global, OKX |
(*) Default exchange
(**) Use in cautions due to the deprecation (no data update)
In order to get USD or USDT price of BTC of specific exchange from above (eg. btcusdt pair of binance),
you must specify market, exchange and symbol of BTC pair.
For volume metric, the unit of volume could be USD, USDT or BTC.
This is because exchanges have their own price data policy. All Exchange’s volume is in BTC and available since the earliest time of exchanges.
Please refer to volume unit of each exchange from below table.
Supported Pairs By Exchange
◦ Spot
| Name | Exchange | Symbol | Volume Unit | Available Since |
|---|---|---|---|---|
| All Exchange | all_exchange | btc_usd* | BTC | 2009-01-03 18:15:00 |
| Binance | binance | btc_usdt* | BTC | 2017-08-17 04:00:00 |
| Binance US | binance_us | btc_usd* btc_usdt | BTC | 2019-09-17 10:17:00 2019-09-23 08:34:00 |
| Bitfinex | bitfinex | btc_usd* btc_usdt | BTC | 2013-04-01 00:07:00 2019-03-11 10:05:00 |
| Bittrex | bittrex | btc_usd* btc_usdt | USD USDT | 2018-05-31 16:26:00 2015-12-12 14:59:00 |
| Coinbase Advanced | coinbase_advanced | btc_usd* | BTC | 2015-07-20 21:37:00 |
| FTX** | ftx | btc_usd* btc_usdt | USD USDT | 2019-07-21 13:11:00 2020-03-28 14:40:00 |
| Gemini | gemini | btc_usd* | BTC | 2019-08-30 00:00:00 |
| HTX Global | htx_global | btc_usdt* | BTC | 2019-11-19 00:00:00 |
| Kraken | kraken | btc_usd* btc_usdt | BTC | 2013-10-06 21:34:00 2019-12-19 18:06:00 |
| OKX | okx | btc_usdt* | BTC | 2019-10-01 00:00:00 |
◦ Perpetual
| Exchange | Exchange Symbol | Pair Symbol | Volume | Historical Starting Point |
|---|---|---|---|---|
| All Exchange | all_exchange | btc_usd* | BTC | The earliest time in the exchanges below. |
| Binance | binance | btc_usd* btc_usdt | Cont BTC | 2020-08-11 07:02:00 2019-09-08 17:57:00 |
| Bitmex | bitmex | btc_usd* | USD | 2015-09-25 12:34:00 |
| Bybit | bybit | btc_usd* btc_usdt | USD BTC | 2018-11-14 16:00:00 2020-03-25 10:36:00 |
| Deribit | deribit | btc_usd* | USD | 2018-08-14 10:34:00 |
| FTX** | ftx | btc_usd* | USD | 2019-07-20 12:35:00 |
| HTX Global | htx_global | btc_usd* btc_usdt | Cont BTC | 2020-03-25 09:45:00 2020-10-21 09:08:00 |
| OKX | okx | btc_usd* btc_usdt | Cont BTC | 2019-03-30 00:00:00 2019-12-25 00:00:00 |
(*) Default exchange
(**) Use in cautions due to the deprecation (no data update)
We calculate the OHLCV data of a day from the beginning of UTC 00:00:00. However, the OHLCV data in official sites of HTX and OKX are calculated from the beginning of UTC 16:00:00. Thus, be aware that there may be some intended discrepancy between those.
Supported Windows By Market
| Market | Supported Windows |
|---|---|
| Spot | min, hour, day* |
| Perpetual | min, hour, day* |
(*) Default exchange
curl -X GET "https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv?window=day&from=20191001&limit=2" \
-H "Authorization: Bearer <YOUR_API_KEY>"fetch("https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv?window=day&from=20191001&limit=2", { headers: { "Authorization": "Bearer <YOUR_API_KEY>"} })
.then(response => response.json())
.then(data => console.log(data))require('axios')
.get("https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv?window=day&from=20191001&limit=2", { headers: { Authorization: 'Bearer <YOUR_API_KEY>' } })
.then(response => console.log(response))require 'net/http'
uri = URI("https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv?window=day&from=20191001&limit=2")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer <YOUR_API_KEY>"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.bodyimport requests
headers = {'Authorization': 'Bearer <YOUR_API_KEY>'}
url = "https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv?window=day&from=20191001&limit=2"
print(requests.get(url, headers=headers).json())<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv")
.header("Authorization", "Bearer <token>")
.asString();{
"status": {
"code": 200,
"message": "success"
},
"result": {
"window": "day",
"data": [
{
"date": "2026-06-14",
"open": 64393.87,
"high": 65753.52,
"low": 63628.02,
"close": 65704.89,
"volume": 25241.79
},
{
"date": "2026-06-13",
"open": 63541.16,
"high": 64723.5,
"low": 63393.29,
"close": 64377.53,
"volume": 18332.87
}
]
}
}Authorizations
For each API request, include this HTTP header:
Authorization with the Bearer <YOUR_API_KEY>. Bearer access token is the type of HTTP Authorization. You have to include access token to the HTTP header and note that leading bearer is required.
You must include your access token in HTTP header in every request you make. The token is unique, issued for each client, and regularly changed(once a year). To obtain an access token, please upgrade your plan to Professional or Premium plan. You'll be able to see your access token on the API tab of your profile page after the subscription.
Query Parameters
This defines the starting time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the earliest time.
This defines the ending time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the latest time.
The maximum number of entries to return before the latest data point (or before to if specified). This field ranges from 1 to 100,000.
1 <= x <= 100000A format type about return message type. Supported formats are json, csv.