Candles consist of summary statistics derived from individual trades that describe the trading activity of a market over an interval of time.
Coin Metrics engineers several statistics based on trades data that occurred over an interval of time: opening price, high price, low price, close price, volume-weighted average price, total volume in base asset units, total volume in U.S. dollars, and number of trades in the interval.
Candles are generated at regular time intervals and at a time granularity that is suitable for charting and analysis. For instance, several technical analysis indicators can be calculated using data in candles format.
We produce our candles at
1dintervals. Our candles are calculated directly from our trades data. We construct gapless candles which means that if there are no trades in a candle interval, we fill forward candles through time, setting the open, high, low, and close to the close of the previous candle, setting the vwap to the vwap of the previous candle, and setting the volume to zero.
Coin Metrics calculates candles for spot and future markets from exchanges that are listed on our exchange coverage universe.
time: The time of the beginning of the candle interval in ISO 8601 date-time format.
market: The id of the market. Market ids use the following naming convention:
exchangeName-baseAsset-quoteAsset-spotfor spot markets,
exchangeName-futuresSymbol-futurefor futures markets, and
exchangeName-optionsSymbol-optionfor options markets.
price_open: The opening price of the candle.
price_high: The high price of the candle.
price_low: The low price of the candle.
price_close: The close price of the candle.
vwap: The volume-weighted average price of the candle.
volume: The volume of the candle in units of the base asset.
candle_usd_volume: The volume of the candle in units of U.S. dollars.
candle_trades_count: The number of trades in the candle interval.
What is the historical coverage of your candles data?
Our candles history for Bitcoin begins when it began trading on Mt.Gox in July 2010, so we have over 10 years of candles history. We also have full historical candles from several other early exchanges such as Bitstamp, TheRockTrading, Bitfinex, and Kraken.
Our candles are calculated from trades data that we collect. Some exchanges allow users to query all of their historical trades data while other exchanges only allow users to query a short amount of history such as the past 1,000 trades. Coin Metrics always attempts to collect the maximum backhistory possible. If an exchange allows us to query historical trades data, we will collect data from every market starting from the inception of the exchange.
Yes! All of our endpoints that accept the
marketsparameter will accept wildcards like
*USDT-future. The wildcards will match any market which fits this pattern so users do not need to specify every individual market when querying data for multiple markets. The
marketsparameter will also accept a comma-separated string of individual markets.
Our candle generator waits 20 minutes before calculating a candle to ensure that we are not missing any trades in the candle interval. We are working towards a future upgrade that will reduce this lag. If you require candles with very low delay, we recommend calculating them using our trades data.
How does Coin Metrics ensure high levels of data quality and data integrity?
Please take a look at this question in the Market Data FAQs page linked below.
Why are there some observations where the candle vwap is higher than the high price or lower than the low price?
We construct gapless candles which means that if there are no trades in a candle interval, we fill forward candles through time, setting the open, high, low, and close to the close of the previous candle, setting the vwap to the vwap of the previous candle, and setting the volume to zero. In cases where there are no trades in a candle interval, it is expected that the vwap may be higher than the high price or lower than the low price due to our fill forward logic.
What does the time for each candle observation represent?
Since candles represent a set of summary statistics measured over an interval of time (such as one calendar day), by convention we set the
timefield to the beginning of the candle interval.
For instance, if the
timefor a daily candle is
2022-02-17 00:00:00, this means that the
price_openrepresents the price of the first trade after
2022-02-17 00:00:00.000000while the
price_closerepresents the price of the last trade before
2022-02-17 23:59:59.999999. And the volume represents the sum of the trades amounts from
2022-02-17 23:59:59.999999, inclusive. Here we represent
00:00:00as the beginning of a calendar day according to the ISO 8601 standard.
- Candles data is filled forward longer than needed for markets that are delisted. We are working on a future upgrade to our candles that will correct this.
- CM MDF v1.0 on April 2020: Added candles for all spot markets on major exchanges. CM MDF v2.0 on December 9, 2019: Added candles for spot markets on Binance.US. Added candles for futures markets on BitMEX and Huobi.
The previous 24 hours of trades data is available through our community API. Community data is available via HTTP API only and is limited to 1,000 API requests per 10 minutes per IP address. All of our trades data is available through our professional API with higher rate limits. The professional API supports trades data through both our HTTP API and websocket API.