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

Method parsePosition

js/src/bitget.js:8261–8486  ·  view source on GitHub ↗
(position, market = undefined)

Source from the content-addressed store, hash-verified

8259 return this.filterByArrayPositions(result, 'symbol', symbols, false);
8260 }
8261 parsePosition(position, market = undefined) {
8262 //
8263 // fetchPosition
8264 //
8265 // {
8266 // "marginCoin": "USDT",
8267 // "symbol": "BTCUSDT",
8268 // "holdSide": "long",
8269 // "openDelegateSize": "0",
8270 // "marginSize": "3.73555",
8271 // "available": "0.002",
8272 // "locked": "0",
8273 // "total": "0.002",
8274 // "leverage": "20",
8275 // "achievedProfits": "0",
8276 // "openPriceAvg": "37355.5",
8277 // "marginMode": "crossed",
8278 // "posMode": "hedge_mode",
8279 // "unrealizedPL": "0.007",
8280 // "liquidationPrice": "31724.970702417",
8281 // "keepMarginRate": "0.004",
8282 // "markPrice": "37359",
8283 // "marginRatio": "0.029599540355",
8284 // "cTime": "1700807507275"
8285 // }
8286 //
8287 // uta: fetchPosition
8288 //
8289 // {
8290 // "category": "USDT-FUTURES",
8291 // "symbol": "BTCUSDT",
8292 // "marginCoin": "USDT",
8293 // "holdMode": "hedge_mode",
8294 // "posSide": "long",
8295 // "marginMode": "crossed",
8296 // "positionBalance": "5.435199",
8297 // "available": "0.001",
8298 // "frozen": "0",
8299 // "total": "0.001",
8300 // "leverage": "20",
8301 // "curRealisedPnl": "0",
8302 // "avgPrice": "107410.3",
8303 // "positionStatus": "normal",
8304 // "unrealisedPnl": "0.0047",
8305 // "liquidationPrice": "0",
8306 // "mmr": "0.004",
8307 // "profitRate": "0.0008647337475591",
8308 // "markPrice": "107415.3",
8309 // "breakEvenPrice": "107539.2",
8310 // "totalFunding": "0",
8311 // "openFeeTotal": "-0.06444618",
8312 // "closeFeeTotal": "0",
8313 // "createdTime": "1750495670699",
8314 // "updatedTime": "1750929883465"
8315 // }
8316 //
8317 // fetchPositions: privateMixGetV2MixPositionAllPosition
8318 //

Callers 2

fetchPositionMethod · 0.95
fetchPositionsMethod · 0.95

Calls 15

safeInteger2Method · 0.80
safeStringMethod · 0.45
safeMarketMethod · 0.45
safeIntegerNMethod · 0.45
safeString2Method · 0.45
stringAddMethod · 0.45
safeValueMethod · 0.45
numberToStringMethod · 0.45
safeStringNMethod · 0.45
stringMulMethod · 0.45
stringDivMethod · 0.45
parseNumberMethod · 0.45

Tested by

no test coverage detected