(self, position: dict, market: Market = None)
| 6371 | return self.filter_by_array_positions(results, 'symbol', symbols, False) |
| 6372 | |
| 6373 | def parse_position(self, position: dict, market: Market = None) -> Position: |
| 6374 | # |
| 6375 | # linear swap |
| 6376 | # |
| 6377 | # { |
| 6378 | # "positionIdx": 0, |
| 6379 | # "riskId": "11", |
| 6380 | # "symbol": "ETHUSDT", |
| 6381 | # "side": "Buy", |
| 6382 | # "size": "0.10", |
| 6383 | # "positionValue": "119.845", |
| 6384 | # "entryPrice": "1198.45", |
| 6385 | # "tradeMode": 1, |
| 6386 | # "autoAddMargin": 0, |
| 6387 | # "leverage": "4.2", |
| 6388 | # "positionBalance": "28.58931118", |
| 6389 | # "liqPrice": "919.10", |
| 6390 | # "bustPrice": "913.15", |
| 6391 | # "takeProfit": "0.00", |
| 6392 | # "stopLoss": "0.00", |
| 6393 | # "trailingStop": "0.00", |
| 6394 | # "unrealisedPnl": "0.083", |
| 6395 | # "createdTime": "1669097244192", |
| 6396 | # "updatedTime": "1669413126190", |
| 6397 | # "tpSlMode": "Full", |
| 6398 | # "riskLimitValue": "900000", |
| 6399 | # "activePrice": "0.00" |
| 6400 | # } |
| 6401 | # |
| 6402 | # usdc |
| 6403 | # { |
| 6404 | # "symbol":"BTCPERP", |
| 6405 | # "leverage":"1.00", |
| 6406 | # "occClosingFee":"0.0000", |
| 6407 | # "liqPrice":"", |
| 6408 | # "positionValue":"30.8100", |
| 6409 | # "takeProfit":"0.0", |
| 6410 | # "riskId":"10001", |
| 6411 | # "trailingStop":"0.0000", |
| 6412 | # "unrealisedPnl":"0.0000", |
| 6413 | # "createdAt":"1652451795305", |
| 6414 | # "markPrice":"30809.41", |
| 6415 | # "cumRealisedPnl":"0.0000", |
| 6416 | # "positionMM":"0.1541", |
| 6417 | # "positionIM":"30.8100", |
| 6418 | # "updatedAt":"1652451795305", |
| 6419 | # "tpSLMode":"UNKNOWN", |
| 6420 | # "side":"Buy", |
| 6421 | # "bustPrice":"", |
| 6422 | # "deleverageIndicator":"0", |
| 6423 | # "entryPrice":"30810.0", |
| 6424 | # "size":"0.001", |
| 6425 | # "sessionRPL":"0.0000", |
| 6426 | # "positionStatus":"NORMAL", |
| 6427 | # "sessionUPL":"-0.0006", |
| 6428 | # "stopLoss":"0.0", |
| 6429 | # "orderMargin":"0.0000", |
| 6430 | # "sessionAvgPrice":"30810.0" |
no test coverage detected