unWatchOHLCV / unWatchTrades missing on gate (candles), blofin, bitrue, lbank, poloniex and kraken · Issue #30955 · ccxt/ccxt · GitHub
Skip to content

unWatchOHLCV / unWatchTrades missing on gate (candles), blofin, bitrue, lbank, poloniex and kraken #30955

Open

Description

@jota78

Preliminary Checks

  • I have already searched for existing issues and confirmed that this issue is not a duplicate

Is your feature request related to a problem? Please describe

We chart many pairs at once with watchOHLCV (and watchTrades where an exchange streams no candles), and call unWatchOHLCV / unWatchTrades when a chart closes. On the exchanges below there is no unsubscribe, so the exchange keeps streaming every pair that was ever watched on that connection, and the client keeps parsing it into its caches, until the whole client is closed.

Checked on master (844df9e), ts/src/pro/*.ts:

exchange unWatchOHLCV unWatchTrades
gate missing (has says false) implemented
blofin missing missing
bitrue missing missing
lbank missing missing
poloniex missing missing
kraken missing missing

Side note: bitget implements both unWatchOHLCV and unWatchTrades, but its has doesn't declare them, so code that checks has before calling them never unsubscribes there.

Describe the solution you'd like

unWatchOHLCV and unWatchTrades on these exchanges (each one's own unsubscribe message), as binance, okx, bybit, kucoin, mexc, htx, bingx and bitget have, and bitget's has flags set.

Describe alternatives you've considered

Closing the exchange's whole client once nothing on it is watched, which is what we do for now. It frees the connection, but while any chart on that exchange stays open, the pairs no longer shown keep streaming. We can send pull requests for some of these exchanges if that helps.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions