Skip to main content
GET
JavaScript

Authorizations

api_key
string
query
required

Coin Metrics API key can be specified as ?api_key= query parameter.

Query Parameters

markets
string[]
required

Comma separated list of markets or market patterns like exchange-* or exchange-*-spot or *USDT-future.
Use a corresponding /catalog-all-v2/market-{dataType} endpoint for the full list of supported markets for a given data type.

frequency
string
default:1m

Candle duration. Supported values are 1m, 5m, 10m, 15m, 30m, 1h, 4h, 1d.

Example:

"1m"

backfill
enum<string>
default:latest

What data should be sent upon a connection.
By default the latest values are sent just before real-time data.

Available options:
latest,
none
pretty
boolean
default:false

Human-readable formatting of JSON responses.

Response

Candle WebSocket message.

Information about market candle.

market
string
required

Unique name of the market.

time
string<date-time>
required

The time in ISO 8601 date-time format. Always with nanoseconds precision.

price_open
string<decimal>
required

The opening price of the candle.

price_close
string<decimal>
required

The closing price of the candle.

price_high
string<decimal>
required

The high price of the candle.

price_low
string<decimal>
required

The low price of the candle.

vwap
string<decimal>
required

The volume-weighted average price of the candle.

volume
string<decimal>
required

The volume of the candle in units of the base asset.

candle_usd_volume
string<decimal>
required

The volume of the candle in USD. The value is rounded to at most 9 decimal places (half-even rounding).

candle_trades_count
string<int64>
required

The number of trades used for candle calculation.

cm_sequence_id
string
required

The monotonically increasing message number, resets on disconnection.

twap
string<decimal>

The time-weighted average price of the candle. Each trade price is held until the next trade or the end of the candle; before the first trade, the last trade price before the candle start is used. Candles without trades use the previous close. The value is rounded to at most 9 decimal places (half-even rounding). Omitted for candles computed before TWAP support.