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.

Price OHLCV

get

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

Authorizations
AuthorizationstringRequired

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.

Query parameters
marketstringOptional

A market type from the table that we support. See here

Default: spotExample: spot
exchangestringOptional

A exchange from the table that we support. See here.

Default: all_exchangeExample: binance
symbolstringOptional

A BTC pair symbol from the table that we support. See here

Example: btc_usd
windowstringOptional

A window from the table that we support. See here

Default: dayExample: day
fromanyOptional

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.

Example: 20191001T100000
toanyOptional

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.

Example: 20191001T103025
limitinteger · min: 1 · max: 100000Optional

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.

Default: 100Example: 100
formatstringOptional

A format type about return message type. Supported formats are json, csv.

Default: jsonExample: json
Responses
chevron-right
200

Price OHLCV Data

application/json
get
/btc/market-data/price-ohlcv
200

Price OHLCV Data

Open Interest

get

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.

Name
Exchange
Symbol
Available Since

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)

Authorizations
AuthorizationstringRequired

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.

Query parameters
exchangestringRequired

A derivative exchange from the table that we support. See here.

Example: bitmex
windowstringOptional

Currently we support day, hour, and min.

Default: dayExample: day
fromanyOptional

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.

Example: 20191001T100000
toanyOptional

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.

Example: 20191001T103025
limitinteger · min: 1 · max: 100000Optional

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.

Default: 100Example: 100
formatstringOptional

A format type about return message type. Supported formats are json, csv.

Default: jsonExample: json
Responses
chevron-right
200

Open Interest in USD

application/json
get
/btc/market-data/open-interest
200

Open Interest in USD

Funding Rates

get

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.

Name
Exchange
Symbol
Available Since

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

Authorizations
AuthorizationstringRequired

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.

Query parameters
exchangestringRequired

A derivative exchange from the table that we support. See here.

Example: bitmex
windowstringOptional

Currently we support day, hour, and min.

Default: dayExample: day
fromanyOptional

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.

Example: 20191001T100000
toanyOptional

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.

Example: 20191001T103025
limitinteger · min: 1 · max: 100000Optional

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.

Default: 100Example: 100
formatstringOptional

A format type about return message type. Supported formats are json, csv.

Default: jsonExample: json
Responses
chevron-right
200

Funding Rates in percentage

application/json
get
/btc/market-data/funding-rates
200

Funding Rates in percentage

Taker Buy Sell Stats

get

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.

Name
Exchange
Symbol
Available Since

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

Authorizations
AuthorizationstringRequired

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.

Query parameters
exchangestringRequired

A derivative exchange from the table that we support. See here.

Example: bitmex
windowstringOptional

Currently we support day, hour, and min.

Default: dayExample: day
fromanyOptional

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.

Example: 20191001T100000
toanyOptional

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.

Example: 20191001T103025
limitinteger · min: 1 · max: 100000Optional

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.

Default: 100Example: 100
formatstringOptional

A format type about return message type. Supported formats are json, csv.

Default: jsonExample: json
Responses
chevron-right
200

Taker Buy, Sell volume and ratio

application/json
get
/btc/market-data/taker-buy-sell-stats
200

Taker Buy, Sell volume and ratio

Liquidations

get

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-27arrow-up-right, which makes the distribution of the data has changed after that.

Name
Exchange
Symbol
Available Since

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)

Authorizations
AuthorizationstringRequired

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.

Query parameters
exchangestringRequired

A derivative exchange from the table that we support. See here.

Example: deribit
symbolstringOptional

A BTC pair symbol from the table that we support. See here

Default: all_symbolExample: btc_usd
windowstringOptional

Currently we support day, hour, and min.

Default: dayExample: day
fromanyOptional

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.

Example: 20191001T100000
toanyOptional

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.

Example: 20191001T103025
limitinteger · min: 1 · max: 100000Optional

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.

Default: 100Example: 100
formatstringOptional

A format type about return message type. Supported formats are json, csv.

Default: jsonExample: json
Responses
chevron-right
200

Amount of long/short liquidations orders

application/json
get
/btc/market-data/liquidations
200

Amount of long/short liquidations orders

Capitalization

get

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‣arrow-up-right

Authorizations
AuthorizationstringRequired

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.

Query parameters
windowstringOptional

Currently we support day and block.

Default: dayExample: day
fromanyOptional

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.

Example: 20191001T100000
toanyOptional

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.

Example: 20191001T103025
limitinteger · min: 1 · max: 100000Optional

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.

Default: 100Example: 100
formatstringOptional

A format type about return message type. Supported formats are json, csv.

Default: jsonExample: json
Responses
chevron-right
200

market_cap, realized_cap, average_cap, delta_cap, thermo_cap

application/json
get
/btc/market-data/capitalization
200

market_cap, realized_cap, average_cap, delta_cap, thermo_cap

Coinbase Premium Index

get

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.

Authorizations
AuthorizationstringRequired

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.

Query parameters
windowstringOptional

Currently we support day, hour, and min.

Default: dayExample: day
fromanyOptional

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.

Example: 20191001T100000
toanyOptional

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.

Example: 20191001T103025
limitinteger · min: 1 · max: 100000Optional

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.

Default: 100Example: 100
formatstringOptional

A format type about return message type. Supported formats are json, csv.

Default: jsonExample: json
Responses
chevron-right
200

Coinbase Premium Index in percentage and Coinbase Premium Gap

application/json
get
/btc/market-data/coinbase-premium-index
200

Coinbase Premium Index in percentage and Coinbase Premium Gap

Last updated

Was this helpful?