Skip to main content
{
    "method": "subscribe",
    "params": {
        "channel": "ohlc",
        "symbol": [
            "ALGO/USD",
            "MATIC/USD"
        ],
        "interval": 5
    }
}
{
    "method": "subscribe",
    "result": {
        "channel": "ohlc",
        "interval": 5,
        "snapshot": true,
        "symbol": "ALGO/USD",
        "warnings": [
            "timestamp is deprecated, use interval_begin"
        ]
    },
    "success": true,
    "time_in": "2023-10-04T16:26:01.802708Z",
    "time_out": "2023-10-04T16:26:01.802791Z"
}

{
    "method": "subscribe",
    "result": {
        "channel": "ohlc",
        "interval": 5,
        "snapshot": true,
        "symbol": "MATIC/USD",
        "warnings": [
            "timestamp is deprecated, use interval_begin"
        ]
    },
    "success": true,
    "time_in": "2023-10-04T16:26:01.802708Z",
    "time_out": "2023-10-04T16:26:01.802791Z"
}
{
    "channel": "ohlc",
    "type": "snapshot",
    "timestamp": "2023-10-04T16:26:01.806315597Z",
    "data": [
        {
            "symbol": "ALGO/USD",
            "open": 0.09875,
            "high": 0.09875,
            "low": 0.09875,
            "close": 0.09875,
            "trades": 1,
            "volume": 201.86015,
            "vwap": 0.09875,
            "interval_begin": "2023-10-04T15:25:00.000000000Z",
            "interval": 5,
            "timestamp": "2023-10-04T15:30:00.000000Z"
        },
        {
            "symbol": "ALGO/USD",
            "open": 0.09875,
            "high": 0.0988,
            "low": 0.09875,
            "close": 0.09875,
            "trades": 13,
            "volume": 16255.46368,
            "vwap": 0.09879,
            "interval_begin": "2023-10-04T15:30:00.000000000Z",
            "interval": 5,
            "timestamp": "2023-10-04T15:35:00.000000Z"
        }
    ]
}
{
    "channel": "ohlc",
    "type": "update",
    "timestamp": "2023-10-04T16:26:30.524394914Z",
    "data": [
        {
            "symbol": "MATIC/USD",
            "open": 0.5624,
            "high": 0.5628,
            "low": 0.5622,
            "close": 0.5627,
            "trades": 12,
            "volume": 30927.68066226,
            "vwap": 0.5626,
            "interval_begin": "2023-10-04T16:25:00.000000000Z",
            "interval": 5,
            "timestamp": "2023-10-04T16:30:00.000000Z"
        }
    ]
}
{
    "method": "unsubscribe",
    "params": {
        "channel": "ohlc",
        "symbol": [
            "ALGO/USD",
            "MATIC/USD"
        ],
        "interval": 5
    }
}
{
    "method": "unsubscribe",
    "result": {
        "channel": "ohlc",
        "interval": 5,
        "symbol": "ALGO/USD"
    },
    "success": true,
    "time_in": "2023-10-04T16:26:01.802708Z",
    "time_out": "2023-10-04T16:26:01.802791Z"
}

{
    "method": "unsubscribe",
    "result": {
        "channel": "ohlc",
        "interval": 5,
        "symbol": "MATIC/USD"
    },
    "success": true,
    "time_in": "2023-10-04T16:26:01.802708Z",
    "time_out": "2023-10-04T16:26:01.802791Z"
}
WSSws.kraken.com/v2ohlc
The ohlc channel streams the Open, High, Low and Close (OHLC) data for the specific interval period. The feed accepts a list of symbols for subscription and the updates are generated on trade events.

Subscribe

There is an acknowledgement response for each symbol in the subscription list.
method
string
required
Value: subscribe
params
object
required
req_id
integer
Optional client originated request identifier sent as acknowledgment in the response.

Snapshot / Update

The snapshot and update responses share the same schema. An update message is streamed on a trade event.
channel
string
Value: ohlc
type
string
One of: snapshot, update
data
object[]
A list of candle events.

Unsubscribe

There is an acknowledgement response for each symbol in the unsubscribe list.
method
string
required
Value: unsubscribe
params
object
required
req_id
integer
Optional client originated request identifier sent as acknowledgment in the response.