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

Method parsePosition

ts/src/bitget.ts:8133–8355  ·  view source on GitHub ↗
(position: Dict, market: Market = undefined)

Source from the content-addressed store, hash-verified

8131 }
8132
8133 parsePosition (position: Dict, market: Market = undefined) {
8134 //
8135 // fetchPosition
8136 //
8137 // {
8138 // "marginCoin": "USDT",
8139 // "symbol": "BTCUSDT",
8140 // "holdSide": "long",
8141 // "openDelegateSize": "0",
8142 // "marginSize": "3.73555",
8143 // "available": "0.002",
8144 // "locked": "0",
8145 // "total": "0.002",
8146 // "leverage": "20",
8147 // "achievedProfits": "0",
8148 // "openPriceAvg": "37355.5",
8149 // "marginMode": "crossed",
8150 // "posMode": "hedge_mode",
8151 // "unrealizedPL": "0.007",
8152 // "liquidationPrice": "31724.970702417",
8153 // "keepMarginRate": "0.004",
8154 // "markPrice": "37359",
8155 // "marginRatio": "0.029599540355",
8156 // "cTime": "1700807507275"
8157 // }
8158 //
8159 // uta: fetchPosition
8160 //
8161 // {
8162 // "category": "USDT-FUTURES",
8163 // "symbol": "BTCUSDT",
8164 // "marginCoin": "USDT",
8165 // "holdMode": "hedge_mode",
8166 // "posSide": "long",
8167 // "marginMode": "crossed",
8168 // "positionBalance": "5.435199",
8169 // "available": "0.001",
8170 // "frozen": "0",
8171 // "total": "0.001",
8172 // "leverage": "20",
8173 // "curRealisedPnl": "0",
8174 // "avgPrice": "107410.3",
8175 // "positionStatus": "normal",
8176 // "unrealisedPnl": "0.0047",
8177 // "liquidationPrice": "0",
8178 // "mmr": "0.004",
8179 // "profitRate": "0.0008647337475591",
8180 // "markPrice": "107415.3",
8181 // "breakEvenPrice": "107539.2",
8182 // "totalFunding": "0",
8183 // "openFeeTotal": "-0.06444618",
8184 // "closeFeeTotal": "0",
8185 // "createdTime": "1750495670699",
8186 // "updatedTime": "1750929883465"
8187 // }
8188 //
8189 // fetchPositions: privateMixGetV2MixPositionAllPosition
8190 //

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