MCPcopy Create free account
hub / github.com/ccxt/ccxt / parse_position

Method parse_position

python/ccxt/bitget.py:7756–7970  ·  view source on GitHub ↗
(self, position: dict, market: Market = None)

Source from the content-addressed store, hash-verified

7754 return self.filter_by_array_positions(result, 'symbol', symbols, False)
7755
7756 def parse_position(self, position: dict, market: Market = None):
7757 #
7758 # fetchPosition
7759 #
7760 # {
7761 # "marginCoin": "USDT",
7762 # "symbol": "BTCUSDT",
7763 # "holdSide": "long",
7764 # "openDelegateSize": "0",
7765 # "marginSize": "3.73555",
7766 # "available": "0.002",
7767 # "locked": "0",
7768 # "total": "0.002",
7769 # "leverage": "20",
7770 # "achievedProfits": "0",
7771 # "openPriceAvg": "37355.5",
7772 # "marginMode": "crossed",
7773 # "posMode": "hedge_mode",
7774 # "unrealizedPL": "0.007",
7775 # "liquidationPrice": "31724.970702417",
7776 # "keepMarginRate": "0.004",
7777 # "markPrice": "37359",
7778 # "marginRatio": "0.029599540355",
7779 # "cTime": "1700807507275"
7780 # }
7781 #
7782 # uta: fetchPosition
7783 #
7784 # {
7785 # "category": "USDT-FUTURES",
7786 # "symbol": "BTCUSDT",
7787 # "marginCoin": "USDT",
7788 # "holdMode": "hedge_mode",
7789 # "posSide": "long",
7790 # "marginMode": "crossed",
7791 # "positionBalance": "5.435199",
7792 # "available": "0.001",
7793 # "frozen": "0",
7794 # "total": "0.001",
7795 # "leverage": "20",
7796 # "curRealisedPnl": "0",
7797 # "avgPrice": "107410.3",
7798 # "positionStatus": "normal",
7799 # "unrealisedPnl": "0.0047",
7800 # "liquidationPrice": "0",
7801 # "mmr": "0.004",
7802 # "profitRate": "0.0008647337475591",
7803 # "markPrice": "107415.3",
7804 # "breakEvenPrice": "107539.2",
7805 # "totalFunding": "0",
7806 # "openFeeTotal": "-0.06444618",
7807 # "closeFeeTotal": "0",
7808 # "createdTime": "1750495670699",
7809 # "updatedTime": "1750929883465"
7810 # }
7811 #
7812 # fetchPositions: privateMixGetV2MixPositionAllPosition
7813 #

Callers 2

fetch_positionMethod · 0.95
fetch_positionsMethod · 0.95

Calls 15

safe_stringMethod · 0.80
safe_integer_nMethod · 0.80
safe_string_2Method · 0.80
string_addMethod · 0.80
safe_valueMethod · 0.80
safe_string_nMethod · 0.80
string_mulMethod · 0.80
string_divMethod · 0.80
parse_numberMethod · 0.80
safe_numberMethod · 0.80
omit_zeroMethod · 0.80
string_gtMethod · 0.80

Tested by

no test coverage detected