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

Method parseAccountPosition

js/src/binance.js:10371–10624  ·  view source on GitHub ↗
(position, market = undefined)

Source from the content-addressed store, hash-verified

10369 return result;
10370 }
10371 parseAccountPosition(position, market = undefined) {
10372 //
10373 // usdm
10374 //
10375 // v3 (similar for cross & isolated)
10376 //
10377 // {
10378 // "symbol": "WLDUSDT",
10379 // "positionSide": "BOTH",
10380 // "positionAmt": "-849",
10381 // "unrealizedProfit": "11.17920750",
10382 // "notional": "-1992.46079250",
10383 // "isolatedMargin": "0",
10384 // "isolatedWallet": "0",
10385 // "initialMargin": "99.62303962",
10386 // "maintMargin": "11.95476475",
10387 // "updateTime": "1721995760449"
10388 // "leverage": "50", // in v2
10389 // "entryPrice": "2.34", // in v2
10390 // "positionInitialMargin": "118.82116614", // in v2
10391 // "openOrderInitialMargin": "0", // in v2
10392 // "isolated": false, // in v2
10393 // "breakEvenPrice": "2.3395788", // in v2
10394 // "maxNotional": "25000", // in v2
10395 // "bidNotional": "0", // in v2
10396 // "askNotional": "0" // in v2
10397 // }
10398 //
10399 // coinm
10400 //
10401 // {
10402 // "symbol": "BTCUSD_210625",
10403 // "initialMargin": "0.00024393",
10404 // "maintMargin": "0.00002439",
10405 // "unrealizedProfit": "-0.00000163",
10406 // "positionInitialMargin": "0.00024393",
10407 // "openOrderInitialMargin": "0",
10408 // "leverage": "10",
10409 // "isolated": false,
10410 // "positionSide": "BOTH",
10411 // "entryPrice": "41021.20000069",
10412 // "maxQty": "100",
10413 // "notionalValue": "0.00243939",
10414 // "isolatedWallet": "0",
10415 // "crossMargin": "0.314"
10416 // "crossWalletBalance": "34",
10417 // }
10418 //
10419 // linear portfolio margin
10420 //
10421 // {
10422 // "symbol": "CTSIUSDT",
10423 // "initialMargin": "0",
10424 // "maintMargin": "0",
10425 // "unrealizedProfit": "0.00000000",
10426 // "positionInitialMargin": "0",
10427 // "openOrderInitialMargin": "0",
10428 // "leverage": "20",

Callers 1

parseAccountPositionsMethod · 0.95

Calls 15

safeMarketMethod · 0.95
toStringMethod · 0.95
parseIntFunction · 0.85
safeStringMethod · 0.45
parseNumberMethod · 0.45
stringDivMethod · 0.45
isRoundNumberMethod · 0.45
stringAddMethod · 0.45
safeString2Method · 0.45
stringAbsMethod · 0.45
stringMulMethod · 0.45
safeDictMethod · 0.45

Tested by

no test coverage detected