(self, client, subHash: str, unsubHash: str, subHashIsPrefix=False)
| 8182 | raise NotSupported(self.id + ' unWatchBidsAsks() is not supported yet') |
| 8183 | |
| 8184 | def clean_unsubscription(self, client, subHash: str, unsubHash: str, subHashIsPrefix=False): |
| 8185 | if unsubHash in client.subscriptions: |
| 8186 | del client.subscriptions[unsubHash] |
| 8187 | if not subHashIsPrefix: |
| 8188 | if subHash in client.subscriptions: |
| 8189 | del client.subscriptions[subHash] |
| 8190 | if subHash in client.futures: |
| 8191 | error = UnsubscribeError(self.id + ' ' + subHash) |
| 8192 | client.reject(error, subHash) |
| 8193 | else: |
| 8194 | clientSubscriptions = list(client.subscriptions.keys()) |
| 8195 | for i in range(0, len(clientSubscriptions)): |
| 8196 | sub = clientSubscriptions[i] |
| 8197 | if sub.startswith(subHash): |
| 8198 | del client.subscriptions[sub] |
| 8199 | clientFutures = list(client.futures.keys()) |
| 8200 | for i in range(0, len(clientFutures)): |
| 8201 | future = clientFutures[i] |
| 8202 | if future.startswith(subHash): |
| 8203 | error = UnsubscribeError(self.id + ' ' + future) |
| 8204 | client.reject(error, future) |
| 8205 | client.resolve(True, unsubHash) |
| 8206 | |
| 8207 | def clean_cache(self, subscription: dict): |
| 8208 | topic = self.safe_string(subscription, 'topic') |
no test coverage detected