BTC Market Data
This namespace contains endpoints to retrieve metrics related to the value of Bitcoin, including price, open interest, market cap, realized cap, etc. On top of providing basic market data like price and market cap, we focus on onchain indicators in order to evaluate the true value of Bitcoin. These indicators have been commonly used in building long term valuations, and identifying lows and highs. For more detailed information, please refer to the description of each metric.
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
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
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
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
Spot
min, hour, day*
Perpetual
min, hour, day*
(*) Default exchange
For each API request, include this HTTP header:
Authorization with the Bearer {access_token}. 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.
A market type from the table that we support. See here
spotExample: spotA exchange from the table that we support. See here.
all_exchangeExample: binanceThis 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.
20191001T100000This 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.
20191001T103025The maximum number of entries to return before the latest data point (or before to if specified). This field ranges from 1 to 100,000.
100Example: 100A format type about return message type. Supported formats are json, csv.
jsonExample: jsonPrice OHLCV Data
curl "https://api.cryptoquant.com/v1/btc/market-data/price-ohlcv?window=day&from=20191001&limit=2"Price OHLCV Data
{
"status": {
"code": 200,
"message": "success"
},
"result": {
"window": "day",
"data": [
{
"date": "2019-10-02",
"open": null,
"high": null,
"low": null,
"close": null,
"volume": null
},
{
"date": "2019-10-01",
"open": null,
"high": null,
"low": null,
"close": null,
"volume": null
}
]
}
}This endpoint returns BTC Perpetual Open Interest from derivative exchanges. Supported exchanges for Open Interest are below. Note we unify the unit of return value to USD for each exchange where its contract specification may vary.
All Exchanges
all_exchange
all_symbol
The earliest time in the exchanges below.
Binance
binance
all_symbol
btc_busd
btc_usd
btc_usdt
The earliest time in the symbols. 2021-01-12 00:00:00 2020-08-11 00:00:00 2020-03-13 02:13:00
Bitfinex
bitfinex
all_symbol
btc_usdt
The earliest time in the symbols. 2020-06-01 00:00:00
Bitmex
bitmex
all_symbol
btc_usd
The earliest time in the symbols. 2019-03-30 00:00:00
Bybit
bybit
all_symbol
btc_usd
btc_usdt
The earliest time in the symbols. 2019-11-07 00:00:00 2020-05-28 00:00:00
Deribit
deribit
all_symbol
btc_usd
The earliest time in the symbols. 2019-03-30 00:00:00
FTX**
ftx
all_symbol
btc_usd
The earliest time in the symbols. 2020-05-13 00:00:00
Gate.io
gate_io
all_symbol
btc_usd
btc_usdt
The earliest time in the symbols. 2020-07-01 00:00:00 2020-07-01 00:00:00
HTX Global
htx_global
all_symbol
btc_usd
btc_usdt
The earliest time in the symbols. 2020-06-23 00:00:00 2021-08-26 04:00:00
Kraken
kraken
all_symbol
btc_usd
The earliest time in the symbols. 2019-03-30 00:00:00
OKX
okx
all_symbol
btc_usd
btc_usdt
The earliest time in the symbols. 2019-09-05 23:59:00 2020-01-01 00:00:00
(**) Use in cautions due to the deprecation (no data update)
For each API request, include this HTTP header:
Authorization with the Bearer {access_token}. 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.
A derivative exchange from the table that we support. See here.
bitmexCurrently we support day, hour, and min.
dayExample: dayThis 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.
20191001T100000This 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.
20191001T103025The maximum number of entries to return before the latest data point (or before to if specified). This field ranges from 1 to 100,000.
100Example: 100A format type about return message type. Supported formats are json, csv.
jsonExample: jsonOpen Interest in USD
curl "https://api.cryptoquant.com/v1/btc/market-data/open-interest?window=day&from=20191001&exchange=bitmex"Open Interest in USD
{
"status": {
"code": 200,
"message": "success"
},
"result": {
"window": "day",
"data": [
{
"date": "2019-10-02",
"open_interest": null
},
{
"date": "2019-10-01",
"open_interest": null
}
]
}
}Funding rates represents traders' sentiments of which position they bet on in perpetual swaps market. Positive funding rates implies that many traders are bullish and long traders pay funding to short traders. Negative funding rates implies many traders are bearish and short traders pay funding to long traders.
All Exchanges
all_exchange
The earliest time in the exchanges below.
Binance
binance
BTC-USDT
2019-09-10 00:00:00
Bybit
bybit
BTC-USD
2019-12-01 00:00:00
Bitmex
bitmex
BTC-USD
2016-05-14 04:00:00
Deribit
deribit
BTC-PERPETUAL
2019-03-30 00:00:00
HTX Global
htx_global
BTC-USD
2020-03-25 04:00:00
OKX
okx
BTC-USD
2019-04-01 00:00:00
For each API request, include this HTTP header:
Authorization with the Bearer {access_token}. 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.
A derivative exchange from the table that we support. See here.
bitmexCurrently we support day, hour, and min.
dayExample: dayThis 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.
20191001T100000This 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.
20191001T103025The maximum number of entries to return before the latest data point (or before to if specified). This field ranges from 1 to 100,000.
100Example: 100A format type about return message type. Supported formats are json, csv.
jsonExample: jsonFunding Rates in percentage
curl "https://api.cryptoquant.com/v1/btc/market-data/funding-rates?window=day&from=20191001&exchange=bitmex"Funding Rates in percentage
{
"status": {
"code": 200,
"message": "success"
},
"result": {
"window": "day",
"data": [
{
"date": "2019-10-02",
"funding_rates": null
},
{
"date": "2019-10-01",
"funding_rates": null
}
]
}
}Taker Buy/Sell Stats represent takers' sentiment of which position they are taking in the market. This metric is calculated with perpetual swap trades in each exchange. taker_buy_volume is volume that takers buy. taker_sell_volume is volume that takers sell. taker_total_volume is the sum of taker_buy_volume and taker_sell_volume. taker_buy_ratio is the ratio of taker_buy_volume divided by taker_total_volume. taker_sell_ratio is the ratio of taker_sell_volume divided by taker_total_volume. taker_buy_sell_ratio is the ratio of taker_buy_volume divided by taker_sell_volume. Note we unify the unit of return value to USD for each exchange where its contract specification may vary.
All Exchanges
all_exchange
The earliest time in the exchanges below.
Binance
binance
BTC-USDT
2019-09-08 17:57:00
Bybit
bybit
BTC-USD
2019-11-07 00:00:00
Bitmex
bitmex
BTC-USD
2015-09-25 12:34:00
Deribit
deribit
BTC-PERPETUAL
2019-03-30 00:00:00
HTX Global
htx_global
BTC-USD
2020-03-28 00:00:00
OKX
okx
BTC-USD
2019-03-30 00:00:00
For each API request, include this HTTP header:
Authorization with the Bearer {access_token}. 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.
A derivative exchange from the table that we support. See here.
bitmexCurrently we support day, hour, and min.
dayExample: dayThis 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.
20191001T100000This 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.
20191001T103025The maximum number of entries to return before the latest data point (or before to if specified). This field ranges from 1 to 100,000.
100Example: 100A format type about return message type. Supported formats are json, csv.
jsonExample: jsonTaker Buy, Sell volume and ratio
curl "https://api.cryptoquant.com/v1/btc/market-data/taker-buy-sell-stats?window=day&from=20191001&exchange=bitmex"Taker Buy, Sell volume and ratio
{
"status": {
"code": 200,
"message": "success"
},
"result": {
"window": "day",
"data": [
{
"date": "2019-10-02",
"taker_buy_volume": null,
"taker_sell_volume": null,
"taker_buy_ratio": null,
"taker_sell_ratio": null,
"taker_buy_sell_ratio": null
},
{
"date": "2019-10-01",
"taker_buy_volume": null,
"taker_sell_volume": null,
"taker_buy_ratio": null,
"taker_sell_ratio": null,
"taker_buy_sell_ratio": null
}
]
}
}Liquidations are sum of forced market orders to exit leveraged positions caused by price volatility. Liquidations indicate current price volatility and traders' sentiment which side they had been betting. Note that Binance's liquidation data collection policy has changed since 2021-04-27, which makes the distribution of the data has changed after that.
All Exchanges
all_exchange
all_symbol
The earliest time in the exchanges below.
Binance
binance
all_symbol
btc_busd
btc_usd
btc_usdt
The earliest time in the symbols. 2019-11-20 00:00:00 2020-08-14 00:00:00 2021-01-15 00:00:00
Bitfinex
bitfinex
all_symbol
btc_usdt
The earliest time in the symbols. 2019-09-18 00:00:00
Bitmex
bitmex
all_symbol
btc_usd
The earliest time in the symbols. 2019-04-02 00:00:00
Bybit
bybit
all_symbol
btc_usd
btc_usdt
The earliest time in the symbols. 2020-12-20 00:00:00 2020-12-18 00:00:00
Deribit
deribit
all_symbol
btc_usd
The earliest time in the symbols. 2019-05-25 00:00:00
FTX**
ftx
all_symbol
btc_usd
The earliest time in the symbols. 2019-08-04 00:00:00
Gate.io
gate_io
all_symbol
btc_usd
btc_usdt
The earliest time in the symbols. 2018-12-20 16:00:00 2019-11-18 17:00:00
HTX Global
htx_global
all_symbol
btc_usd
btc_usdt
The earliest time in the symbols. 2020-06-26 00:00:00 2021-09-23 12:00:00
OKX
okx
all_symbol
btc_usd
btc_usdt
The earliest time in the symbols. 2020-12-20 00:00:00 2020-12-17 00:00:00
(**) Use in cautions due to the deprecation (no data update)
For each API request, include this HTTP header:
Authorization with the Bearer {access_token}. 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.
A derivative exchange from the table that we support. See here.
deribitA BTC pair symbol from the table that we support. See here
all_symbolExample: btc_usdCurrently we support day, hour, and min.
dayExample: dayThis 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.
20191001T100000This 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.
20191001T103025The maximum number of entries to return before the latest data point (or before to if specified). This field ranges from 1 to 100,000.
100Example: 100A format type about return message type. Supported formats are json, csv.
jsonExample: jsonAmount of long/short liquidations orders
curl "https://api.cryptoquant.com/v1/btc/market-data/liquidations?window=day&from=20191001&exchange=deribit"Amount of long/short liquidations orders
{
"status": {
"code": 200,
"message": "success"
},
"result": {
"window": "day",
"data": [
{
"date": "2019-10-02",
"long_liquidations": null,
"short_liquidations": null,
"long_liquidations_usd": null,
"short_liquidations_usd": null
},
{
"date": "2019-10-01",
"long_liquidations": null,
"short_liquidations": null,
"long_liquidations_usd": null,
"short_liquidations_usd": null
}
]
}
}This endpoint returns metrics related to market capitalization. First, we provide market_cap, which is total market capitalization of BTC, calculated by multiplying the total supply with its USD price. Moreover, we provide several adjusted capitalization metrics which are used for further fundamental analysis. realized_cap is the sum of each UTXO * last movement price. Since cryptocurrencies can be lost, unclaimed, or unreachable through various bugs, realized_cap is introduced to discount those coins which have remained unmoved for a long period. It is one way to attempt to measure the value of Bitcoin. This can be described as an on-chain version of volume weighted average price(VWAP). average_cap is forever moving average, calculated by dividing the cumulated sum of daily market cap with the age of market. Instead of using fixed time for calculating the moving average (e.g. 50 days, 100days ...), this serves as the true mean. Both realized_cap and average_cap are used to calculate delta_cap (realized_cap-average_cap). delta_cap is often used to spot market bottoms. Moreover, by analyzing the movement of delta_cap which oscillates between realized_cap and average_cap, we could notice that market tops are reached when delta_cap is near realized_cap(in a log scaled chart). Another metric that can be used to spot market bottoms is thermo_cap which is the weighted cumulative sum of the mined cryptocurrency price. This metric provides the total amount of funds in the blockchain network and also helps to evaluate whether market_cap is overvalued or not.
Go to Data Guide‣
For each API request, include this HTTP header:
Authorization with the Bearer {access_token}. 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.
Currently we support day and block.
dayExample: dayThis 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.
20191001T100000This 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.
20191001T103025The maximum number of entries to return before the latest data point (or before to if specified). This field ranges from 1 to 100,000.
100Example: 100A format type about return message type. Supported formats are json, csv.
jsonExample: jsonmarket_cap, realized_cap, average_cap, delta_cap, thermo_cap
curl "https://api.cryptoquant.com/v1/btc/market-data/capitalization?window=day&from=20191001&limit=2"market_cap, realized_cap, average_cap, delta_cap, thermo_cap
{
"status": {
"code": 200,
"message": "success"
},
"result": {
"window": "day",
"data": [
{
"date": "2019-10-02",
"market_cap": null,
"realized_cap": null,
"average_cap": null,
"delta_cap": null,
"thermo_cap": null
},
{
"date": "2019-10-01",
"market_cap": null,
"realized_cap": null,
"average_cap": null,
"delta_cap": null,
"thermo_cap": null
}
]
}
}Coinbase Premium Index is calculated as percent difference from Binance price(BTCUSDT) to Coinbase price(BTCUSD). Coinbase Premium Gap is calculated as gap between Coinbase price(BTCUSD) and Binance price(BTCUSDT). The higher the premium, the stronger the spot buying pressure from Coinbase.
For each API request, include this HTTP header:
Authorization with the Bearer {access_token}. 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.
Currently we support day, hour, and min.
dayExample: dayThis 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.
20191001T100000This 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.
20191001T103025The maximum number of entries to return before the latest data point (or before to if specified). This field ranges from 1 to 100,000.
100Example: 100A format type about return message type. Supported formats are json, csv.
jsonExample: jsonCoinbase Premium Index in percentage and Coinbase Premium Gap
curl "https://api.cryptoquant.com/v1/btc/market-data/coinbase-premium-index?window=day&from=20191001T000000&limit=2"Coinbase Premium Index in percentage and Coinbase Premium Gap
{
"status": {
"code": 200,
"message": "success"
},
"result": {
"window": "day",
"data": [
{
"date": "2019-10-02",
"coinbase_premium_gap": null,
"coinbase_premium_index": null
},
{
"date": "2019-10-01",
"coinbase_premium_gap": null,
"coinbase_premium_index": null
}
]
}
}Last updated
Was this helpful?