Skip to main content

Candles (OHLC)

CHANNEL

wss://ws.kraken.com/v2

ohlc

The ohlc channel streams the Open, High, Low and Close (OHLC) data for the specific interval period.

The feed accepts a list symbols for subscription and the updates are generated on trade events.

Subscribe Request

There is an acknowledgement response for each symbol in the subscription list.

MESSAGE BODY

method string required
Value: subscribe
params object
channel string required
Value: ohlc
symbol array of strings required
Example: ["BTC/USD", "MATIC/GBP"]
A list of currency pairs.
interval integer
Possible values: [1, 5, 15, 30, 60, 240, 1440, 10080, 21600]
The interval timeframe in minutes.
snapshot boolean
Possible values: [true, false]
Default value: true
Request a snapshot after subscribing.
req_id integer
Optional client originated request identifier sent as acknowledgment in the response.

Snapshot and Update Response

The snapshot and update responses share the same schema. An update message is streamed on a trade event.

MESSAGE BODY

channel string
Value: ohlc
type string
Possible values: [snapshot, update]
data array [
A list of candle events.
[many] candle object
symbol string
Example: "BTC/USD"
The symbol of the currency pair.
open float
The opening trade price within the interval.
high float
The highest trade price within the interval.
low float
The lowest trade price within the interval.
close float
The last trade price within the interval.
vwap float
Volume weighted average trade price within the interval.
trades float
Number of trades within the interval.
volume float
Total traded volume (in base currency terms) within the interval.
interval_begin string
Format: RFC3339
Example: 2022-12-25T09:30:59.123456Z
The timestamp of start of the interval.
interval integer
The timeframe from the interval in minutes.
timestamp string deprecated
Deprecated Usage: Use 'interval_begin'.
Format: RFC3339
Example: 2022-12-25T09:30:59.123456Z
The timestamp of start of the interval.
]

Unsubscribe Request

There is an acknowledgement response for each symbol in the unsubscribe list.

MESSAGE BODY

method string required
Value: unsubscribe
params object
channel string required
Value: ohlc
symbol array of strings required
Example: ["BTC/USD", "MATIC/GBP"]
A list of currency pairs.
interval integer
Possible values: [1, 5, 15, 30, 60, 240, 1440, 10080, 21600]
The interval timeframe in minutes.
req_id integer
Optional client originated request identifier sent as acknowledgment in the response.