(self, client, messageHash)
| 1362 | self.positions = ArrayCacheBySymbolBySide() |
| 1363 | |
| 1364 | async def load_positions_snapshot(self, client, messageHash): |
| 1365 | positions = await self.fetch_positions() |
| 1366 | self.positions = ArrayCacheBySymbolBySide() |
| 1367 | cache = self.positions |
| 1368 | for i in range(0, len(positions)): |
| 1369 | position = positions[i] |
| 1370 | contracts = self.safe_number(position, 'contracts', 0) |
| 1371 | if contracts > 0: |
| 1372 | cache.append(position) |
| 1373 | # don't remove the future from the .futures cache |
| 1374 | if messageHash in client.futures: |
| 1375 | future = client.futures[messageHash] |
| 1376 | future.resolve(cache) |
| 1377 | client.resolve(cache, 'positions') |
| 1378 | |
| 1379 | def handle_positions(self, client, message): |
| 1380 | # |
nothing calls this directly
no test coverage detected