Skip to content
This repository was archived by the owner on Sep 19, 2025. It is now read-only.
This repository was archived by the owner on Sep 19, 2025. It is now read-only.

WS OHLC subscribe does not return all informations #12

Description

@lexdevelop

Hi I notice that subscribing on ohlc using web socket does not return all data.

this.krakenClient.ws.ohlc({interval: topic.interval})
        .on('update', (update, pair) => {
          this.processOhlcMessage(update, pair)
        })
        .on('status', (status) => {
          this.logger.log(`${status.event}, ${status.channelName} for pair ${status.pair} = ${status.status}`)
        })
        .on('error', (error, pair) => {
          this.logger.error(`Unable to get ohlc data from Kraken for pair: ${pair.pair}`, error.stack)
        })
        .subscribe(...topic.pairs)

on update event will return array of data and pair defined here https://docs.kraken.com/websockets/#message-ohlc but it will not return channel name. Chanell name is important because we can extract interval from it, for example ohlc5-1440, we know that this is update for interval 1440.
It is even better if we can have third parameter return on update event for ohlc which is interval specified for which we are getting response, or simply return channel name with array and pairs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions