Gemini Crypto Exchange Logo
Version 2

Candles Data Feed

The Candle Data feed provides periodic updates with OHLCV data for the given timeframe.

Candle Data Feed Subscribe Message

Send a JSON formatted message with the following fields upon connecting to v2/marketdata:

Field NameTypeValues
typestringsubscribe
subscriptionsarray
-- namestringcandles_1m, candles_5m, etc.
-- symbolsarray["BTCUSD", "ETHBTC", ...]

Candle Data Response

Field NameTypeValues
typestringcandles_1m_updates, candles_5m_updates, etc.
symbolstringBTCUSD, etc.
changesArray of Arrays (TOHLCV)Changes to order book
-- -- timelongmilliseconds
-- -- opendecimalOpen price
-- -- highdecimalHigh price
-- -- lowdecimalLow price
-- -- closedecimalClose price
-- -- volumedecimalVolume

Examples

JSON Candle Subscription Message

JSONCode
{ "type": "subscribe", "subscriptions": [ { "name": "candles_15m", "symbols": ["BTCUSD"] } ] }

JSON Candle Response

JSONCode
{ "type": "candles_15m_updates", "symbol": "BTCUSD", "changes": [ [ 1561054500000, 9350.18, 9358.35, 9350.18, 9355.51, 2.07 ], [ 1561053600000, 9357.33, 9357.33, 9350.18, 9350.18, 1.5900161 ] ... ] }
Last modified on