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

Method parse_position

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

Source from the content-addressed store, hash-verified

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

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