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

Method parse_position_risk

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

Source from the content-addressed store, hash-verified

9963 }
9964
9965 def parse_position_risk(self, position, market: Market = None):
9966 #
9967 # usdm
9968 #
9969 # {
9970 # symbol: "WLDUSDT",
9971 # positionSide: "BOTH",
9972 # positionAmt: "5",
9973 # entryPrice: "2.3483",
9974 # breakEvenPrice: "2.349356735",
9975 # markPrice: "2.39560000",
9976 # unRealizedProfit: "0.23650000",
9977 # liquidationPrice: "0",
9978 # isolatedMargin: "0",
9979 # notional: "11.97800000",
9980 # isolatedWallet: "0",
9981 # updateTime: "1722062678998",
9982 # initialMargin: "2.39560000", # not in v2
9983 # maintMargin: "0.07186800", # not in v2
9984 # positionInitialMargin: "2.39560000", # not in v2
9985 # openOrderInitialMargin: "0", # not in v2
9986 # adl: "2", # not in v2
9987 # bidNotional: "0", # not in v2
9988 # askNotional: "0", # not in v2
9989 # marginAsset: "USDT", # not in v2
9990 # # the below fields are only in v2
9991 # leverage: "5",
9992 # maxNotionalValue: "6000000",
9993 # marginType: "cross",
9994 # isAutoAddMargin: "false",
9995 # isolated: False,
9996 # adlQuantile: "2",
9997 #
9998 # coinm
9999 #
10000 # {
10001 # "symbol": "BTCUSD_PERP",
10002 # "positionAmt": "2",
10003 # "entryPrice": "37643.10000021",
10004 # "markPrice": "38103.05510455",
10005 # "unRealizedProfit": "0.00006413",
10006 # "liquidationPrice": "25119.97445760",
10007 # "leverage": "2",
10008 # "maxQty": "1500",
10009 # "marginType": "isolated",
10010 # "isolatedMargin": "0.00274471",
10011 # "isAutoAddMargin": "false",
10012 # "positionSide": "BOTH",
10013 # "notionalValue": "0.00524892",
10014 # "isolatedWallet": "0.00268058"
10015 # }
10016 #
10017 # inverse portfolio margin
10018 #
10019 # {
10020 # "symbol": "ETHUSD_PERP",
10021 # "positionAmt": "1",
10022 # "entryPrice": "2422.400000007",

Callers 1

fetch_positions_riskMethod · 0.95

Calls 15

safe_marketMethod · 0.95
safe_stringMethod · 0.80
safe_dictMethod · 0.80
safe_listMethod · 0.80
safe_string_2Method · 0.80
string_absMethod · 0.80
string_ltMethod · 0.80
parse_numberMethod · 0.80
omit_zeroMethod · 0.80
string_eqMethod · 0.80
string_gtMethod · 0.80
safe_valueMethod · 0.80

Tested by

no test coverage detected