(self, client: Client, type, symbols: Strings = None, isPortfolioMargin=False)
| 3860 | return self.filter_by_symbols_since_limit(cache, symbols, since, limit, True) |
| 3861 | |
| 3862 | def set_positions_cache(self, client: Client, type, symbols: Strings = None, isPortfolioMargin=False): |
| 3863 | if type == 'spot': |
| 3864 | return |
| 3865 | if self.positions is None: |
| 3866 | self.positions = {} |
| 3867 | if type in self.positions: |
| 3868 | return |
| 3869 | fetchPositionsSnapshot = self.handle_option('watchPositions', 'fetchPositionsSnapshot', False) |
| 3870 | if fetchPositionsSnapshot: |
| 3871 | messageHash = type + ':fetchPositionsSnapshot' |
| 3872 | if not (messageHash in client.futures): |
| 3873 | client.future(messageHash) |
| 3874 | self.spawn(self.load_positions_snapshot, client, messageHash, type, isPortfolioMargin) |
| 3875 | else: |
| 3876 | self.positions[type] = ArrayCacheBySymbolBySide() |
| 3877 | |
| 3878 | async def load_positions_snapshot(self, client, messageHash, type, isPortfolioMargin): |
| 3879 | params = { |
no test coverage detected