(self, client: Client, type, isPortfolioMargin=False)
| 2509 | return |
| 2510 | |
| 2511 | def set_balance_cache(self, client: Client, type, isPortfolioMargin=False): |
| 2512 | if (type in client.subscriptions) and (type in self.balance): |
| 2513 | return |
| 2514 | options = self.safe_value(self.options, 'watchBalance') |
| 2515 | fetchBalanceSnapshot = self.safe_bool(options, 'fetchBalanceSnapshot', False) |
| 2516 | if fetchBalanceSnapshot: |
| 2517 | messageHash = type + ':fetchBalanceSnapshot' |
| 2518 | if not (messageHash in client.futures): |
| 2519 | client.future(messageHash) |
| 2520 | self.spawn(self.load_balance_snapshot, client, messageHash, type, isPortfolioMargin) |
| 2521 | else: |
| 2522 | self.balance[type] = {} |
| 2523 | |
| 2524 | async def load_balance_snapshot(self, client, messageHash, type, isPortfolioMargin): |
| 2525 | params = { |
no test coverage detected