---
title: "Price OHLCV"
method: GET
path: "/btc/market-data/price-ohlcv"
tags: ["BTC Market Data"]
---

# Price OHLCV

`GET /btc/market-data/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. 

<br>

### 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 <br>
> (**) 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.  

<br>

### 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`* <br/> `btc_usdt`  |    BTC       | 2019-09-17 10:17:00 <br/> 2019-09-23 08:34:00 |
| Bitfinex       | `bitfinex`       |  `btc_usd`* <br/> `btc_usdt`  |    BTC       | 2013-04-01 00:07:00 <br/> 2019-03-11 10:05:00 |
| Bittrex        | `bittrex`        |  `btc_usd`* <br/> `btc_usdt`  |    USD <br/> USDT | 2018-05-31 16:26:00 <br/> 2015-12-12 14:59:00 |
| Coinbase Advanced   | `coinbase_advanced`   |  `btc_usd`*                  |    BTC       | 2015-07-20 21:37:00  
| FTX**            | `ftx`            |  `btc_usd`* <br/> `btc_usdt`  |    USD <br/> USDT | 2019-07-21 13:11:00 <br/> 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`* <br/> `btc_usdt`  |    BTC       | 2013-10-06 21:34:00 <br/> 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`* <br/> `btc_usdt`  |    Cont <br/> BTC | 2020-08-11 07:02:00 <br/> 2019-09-08 17:57:00 |
| Bitmex         | `bitmex`         |  `btc_usd`*                   |    USD            | 2015-09-25 12:34:00            |
| Bybit          | `bybit`          |  `btc_usd`* <br/> `btc_usdt`  |    USD  <br/> BTC | 2018-11-14 16:00:00 <br/> 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`* <br/> `btc_usdt`  |    Cont <br/> BTC | 2020-03-25 09:45:00 <br/> 2020-10-21 09:08:00 |
| OKX            | `okx`           |  `btc_usd`* <br/> `btc_usdt`  |    Cont <br/> BTC | 2019-03-30 00:00:00 <br/> 2019-12-25 00:00:00 |

> (*) Default exchange <br>
> (**) 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.

<br>

### Supported Windows By Market

|   Market  |   Supported Windows           |
|-----------|-------------------------------|
| Spot      | `min`, `hour`, `day*`         |
| Perpetual | `min`, `hour`, `day*`         |

> (*) Default exchange

## Query parameters

- `market` string
- `exchange` string
- `symbol` string
- `window` string
- `from` string
- `to` string
- `limit` integer
- `format` string

## Response `200`

Price OHLCV Data

- object
  - `status` object, required — The status object is return with most of requests and indicates if the request was successful. If it is not successful, error information is included.
    - `code` integer, required — HTTP status code
    - `message` string, required — Text description of the error or success.
  - `result` object, required
    - `window` string, required — The size of window. It can be day, hour, min, or block and it depends on the user request.
    - `data` object[], required
      - `blockheight` string — The height of the block. This optional field only appears when window=block is used.
      - `date` string — The date in YYYY-DD-MM. This optional field only appears when window=day is used.
      - `datetime` string — The date and time formatted as YYYY-MM-DD HH:MM:SS (UTC time). This field only appears when window=block is used.
      - `open` number, required — opening price at the beginning of the window.
      - `high` number, required — opening price at the end of the window.
      - `low` number, required — The highest price in a given window.
      - `close` number, required — The lowest price in a given window.
      - `volume` number, required — The total traded amount in a given window.

---

[API](https://skmtc.net/cryptoquant/apis/cryptoquant-data-api.md) · [All operations](https://skmtc.net/cryptoquant/apis/cryptoquant-data-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cryptoquant/cryptoquant-data-api/revisions/81ee223d4908/schema)
