Skip to main content

Get Position Info

Query real-time position data, such as position size, cumulative realizedPNL.

HTTP Request

GET /cloud/trade/v3/position/list

Request Parameters

ParameterRequiredTypeComments
categorytruestringProduct type: spot, linear, inverse
symbolfalsestringSymbol name
  • If symbol passed, it returns data regardless of having position or not.
  • If symbol=null and settleCoin specified, it returns position size greater than zero.
baseCoinfalsestringBase coin.
settleCoinfalsestringSettle coin. For linear & inverse, either symbol or settleCoin is required. symbol has a higher priority
limitfalseintegerLimit for data size per page. [1, 200]. Default: 20
cursorfalsestringCursor. Use the nextPageCursor token from the response to retrieve the next page of the result set

Response Parameters

ParameterTypeComments
categorystringProduct type
listarrayObject
> positionIdxintegerPosition idx, used to identify positions in different position modes
  • 0: One-Way Mode
  • 1: Buy side of both side mode
  • 2: Sell side of both side mode
> riskIdintegerRisk limit ID.
> riskLimitValuestringRisk limit value.
> symbolstringSymbol name
> sidestringPosition side. Buy: long, Sell: short. return an empty string "" for an empty position
> sizestringPosition size
> avgPricestringAverage entry price
> positionValuestringPosition value
> positionStatusStringPosition status. Normal, Liq, Adl
> leveragestringPosition leverage. Valid for contracts only.
> markPricestringLast mark price
> liqPricestringPosition liquidation price
  • Isolated margin: it is the real price for isolated and cross positions; when liqPrice <= minPrice or liqPrice >= maxPrice, it returns ""
  • Cross margin: it is an estimated liquidation price for cross positions (risk rate is controlled at account level). When liqPrice <= minPrice or liqPrice >= maxPrice, it returns ""
> bustPricestringBankruptcy price.
> positionIMstringInitial margin (calculated with mark price)
> positionMMstringMaintenance margin (calculated with mark price)
> takeProfitstringTake profit price
> stopLossstringStop loss price
> trailingStopstringTrailing stop (The distance from market price)
> unrealisedPnlstringUnrealised PnL
> cumRealisedPnlstringCumulative realised pnl
> isReduceOnlybooleanUseful when Zoomex lowers the risk limit.
  • true: Only allowed to reduce the position. You may consider a series of measures, e.g., lower the risk limit tier, decrease leverage or reduce the position, add margin, or cancel orders. After these operations, you can call the "confirm new risk limit" endpoint
  • false (default): No restriction. It means your position is below the system risk level during adjustment
  • Only meaningful for futures isolated and cross positions
> mmrSysUpdatedTimestringUseful when Zoomex lowers the risk limit.
  • When isReduceOnly=true: the timestamp when MMR will be forcibly adjusted by the system
  • When isReduceOnly=false: if not empty, the timestamp when the MMR adjustment has been completed by the system
  • Only set for system adjustments. Manual adjustments will not show a timestamp here
  • Defaults to "". If this symbol has been downgraded by the system previously, it shows the most recent system operation timestamp
  • Only meaningful for futures isolated and cross positions
> leverageSysUpdatedTimestringUseful when Zoomex lowers the risk limit.
  • When isReduceOnly=true: the timestamp when leverage will be forcibly adjusted by the system
  • When isReduceOnly=false: if not empty, the timestamp when the leverage adjustment has been completed by the system
  • Only set for system adjustments. Manual adjustments will not show a timestamp here
  • Defaults to "". If this symbol has been downgraded by the system previously, it shows the most recent system operation timestamp
  • Only meaningful for futures isolated and cross positions
> adlRankIndicatorintegerAuto-deleverage rank indicator. What is Auto-Deleveraging?
> createdTimestringPosition created timestamp (ms)
> updatedTimestringPosition updated timestamp (ms)
nextPageCursorstringRefer to the cursor request parameter

Request Example

GET /cloud/trade/v3/position/list?category=inverse&symbol=BTCUSD HTTP/1.1
Host: openapi-testnet.zoomex.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1672280218882
X-BAPI-RECV-WINDOW: 5000

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {
"list": [
{
"positionIdx": 0,
"riskId": 1,
"riskLimitValue": "150",
"symbol": "BTCUSD",
"side": "Sell",
"size": "299",
"avgPrice": "30004.5006751",
"positionValue": "0.00996518",
"positionStatus": "Normal",
"autoAddMargin": 1,
"adlRankIndicator": 2,
"leverage": "10",
"positionBalance": "0.00100189",
"markPrice": "26926.00",
"liqPrice": "999999.00",
"bustPrice": "999999.00",
"positionMM": "0.0000015",
"positionIM": "0.00009965",
"tpslMode": "Full",
"takeProfit": "0.00",
"stopLoss": "0.00",
"trailingStop": "0.00",
"unrealisedPnl": "0.00113932",
"cumRealisedPnl": "-0.00121275",
"createdTime": "1676538056258",
"updatedTime": "1684742400015"
}
],
"nextPageCursor": "",
"category": "inverse"
},
"retExtInfo": {},
"time": 1684767531904
}