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

Method parse_account_position

python/ccxt/binance.py:9729–9963  ·  view source on GitHub ↗
(self, position, market: Market = None)

Source from the content-addressed store, hash-verified

9727 return result
9728
9729 def parse_account_position(self, position, market: Market = None):
9730 #
9731 # usdm
9732 #
9733 # v3(similar for cross & isolated)
9734 #
9735 # {
9736 # "symbol": "WLDUSDT",
9737 # "positionSide": "BOTH",
9738 # "positionAmt": "-849",
9739 # "unrealizedProfit": "11.17920750",
9740 # "notional": "-1992.46079250",
9741 # "isolatedMargin": "0",
9742 # "isolatedWallet": "0",
9743 # "initialMargin": "99.62303962",
9744 # "maintMargin": "11.95476475",
9745 # "updateTime": "1721995760449"
9746 # "leverage": "50", # in v2
9747 # "entryPrice": "2.34", # in v2
9748 # "positionInitialMargin": "118.82116614", # in v2
9749 # "openOrderInitialMargin": "0", # in v2
9750 # "isolated": False, # in v2
9751 # "breakEvenPrice": "2.3395788", # in v2
9752 # "maxNotional": "25000", # in v2
9753 # "bidNotional": "0", # in v2
9754 # "askNotional": "0" # in v2
9755 # }
9756 #
9757 # coinm
9758 #
9759 # {
9760 # "symbol": "BTCUSD_210625",
9761 # "initialMargin": "0.00024393",
9762 # "maintMargin": "0.00002439",
9763 # "unrealizedProfit": "-0.00000163",
9764 # "positionInitialMargin": "0.00024393",
9765 # "openOrderInitialMargin": "0",
9766 # "leverage": "10",
9767 # "isolated": False,
9768 # "positionSide": "BOTH",
9769 # "entryPrice": "41021.20000069",
9770 # "maxQty": "100",
9771 # "notionalValue": "0.00243939",
9772 # "isolatedWallet": "0",
9773 # "crossMargin": "0.314"
9774 # "crossWalletBalance": "34",
9775 # }
9776 #
9777 # linear portfolio margin
9778 #
9779 # {
9780 # "symbol": "CTSIUSDT",
9781 # "initialMargin": "0",
9782 # "maintMargin": "0",
9783 # "unrealizedProfit": "0.00000000",
9784 # "positionInitialMargin": "0",
9785 # "openOrderInitialMargin": "0",
9786 # "leverage": "20",

Callers 1

Calls 15

safe_marketMethod · 0.95
PreciseClass · 0.90
safe_stringMethod · 0.80
parse_numberMethod · 0.80
string_divMethod · 0.80
is_round_numberMethod · 0.80
string_addMethod · 0.80
safe_string_2Method · 0.80
string_absMethod · 0.80
string_mulMethod · 0.80
safe_dictMethod · 0.80
safe_listMethod · 0.80

Tested by

no test coverage detected