(self, client: Client, message)
| 2652 | self.clean_unsubscription(client, subMessageHash, messageHash) |
| 2653 | |
| 2654 | def handle_un_subscription_status(self, client: Client, message): |
| 2655 | # |
| 2656 | # { |
| 2657 | # "op":"unsubscribe", |
| 2658 | # "args":[ |
| 2659 | # { |
| 2660 | # "instType":"USDT-FUTURES", |
| 2661 | # "channel":"ticker", |
| 2662 | # "instId":"BTCUSDT" |
| 2663 | # }, |
| 2664 | # { |
| 2665 | # "instType":"USDT-FUTURES", |
| 2666 | # "channel":"candle1m", |
| 2667 | # "instId":"BTCUSDT" |
| 2668 | # } |
| 2669 | # ] |
| 2670 | # } |
| 2671 | # or |
| 2672 | # {"event":"unsubscribe","arg":{"instType":"SPOT","channel":"books","instId":"BTCUSDT"}} |
| 2673 | # |
| 2674 | argsList = self.safe_list(message, 'args') |
| 2675 | if argsList is None: |
| 2676 | argsList = [self.safe_dict(message, 'arg', {})] |
| 2677 | for i in range(0, len(argsList)): |
| 2678 | arg = argsList[i] |
| 2679 | channel = self.safe_string_2(arg, 'channel', 'topic') |
| 2680 | if channel.find('books') >= 0: |
| 2681 | # for now only unWatchOrderBook is supporteod |
| 2682 | self.handle_order_book_un_subscription(client, message) |
| 2683 | elif (channel.find('trade') >= 0) or (channel.find('publicTrade') >= 0): |
| 2684 | self.handle_trades_un_subscription(client, message) |
| 2685 | elif channel.find('ticker') >= 0: |
| 2686 | self.handle_ticker_un_subscription(client, message) |
| 2687 | elif channel.find('candle') >= 0: |
| 2688 | self.handle_ohlcv_un_subscription(client, message) |
| 2689 | elif channel.find('kline') >= 0: |
| 2690 | self.handle_ohlcv_un_subscription(client, message) |
| 2691 | return message |
no test coverage detected