Skip to main content

Get Current Position

Info
  • This endpoint requires signature. For specific signature rules, please refer to Authentication
  • This endpoint will trigger rate limit. For specific rules, please refer to Rate Limit.

HTTP request

GET /futures/pending-position

Request parameters

Parameter NameRequiredTypeNotes
marketfalsestringMarket name
market_typetruestringMarket type.
Note: In spot related functions, only SPOT or MARGIN can be used.
In futures related functions, only FUTURES can be used.
pagefalseintNumber of pagination. Default is 1
limitfalseintNumber in each page. Default is 10

Return parameters

Parameter NameTypeNotes
position_idintPosition ID
marketstringMarket name
market_typestringMarket Type
sidestringPosition side
margin_modestringPosition type
open_intereststringPosition
close_avblstringAmount that's available for position closing. Remaining amount that's available for position closing.
ath_position_amountstringATH position amount
unrealized_pnlstringUnrealized profit. The current PNL of open positions, estimated at the Mark Price or the Latest Price.
realized_pnlstringRealized PNL
avg_entry_pricestringAverage entry price
cml_position_valuestringCumulative open position value (calculated based on average open price, not changing with mark price)
max_position_valuestringHistorical maximum open position value (calculated based on open price, not changing with mark price)
take_profit_pricestringTake-profit price
stop_loss_pricestringStop-loss price
take_profit_typestringTake-profit trigger price type. On CoinEx, you can choose different trigger price types when setting "TP/SL" (Take Profit and Stop Loss), using "Latest Price" or "Mark Price" as the trigger price.
stop_loss_typestringStop-loss trigger price type. On CoinEx, you can choose different trigger price types when setting "TP/SL" (Take Profit and Stop Loss), using "Latest Price" or "Mark Price" as the trigger price.
leveragestringLeverage
margin_avblstringAllocated margin.
Cross margin: USDⓈ-margined contract = open position amount * mark price / leverage; Coin-margined contract = open position amount / mark price / leverage.
Isolated margin: Initial margin + added margin - reduced margin.
Upon partial closing, the allocated margin decreases proportionally based on the closing ratio; adding/reducing margin in isolated margin includes manual transfers and funding fee settlements.
ath_margin_sizestringATH margin amount
position_margin_ratestringPosition margin rate
maintenance_margin_ratestringMaintenance margin rate. CoinEx adopts a Maintenance Margin Level System.
The more positions you hold, the higher the maintenance margin rate, and the lower the leverage available.
The fewer positions, the lower the maintenance margin rate, and the higher the leverage available.
maintenance_margin_valuestringMaintenance margin amount. Maintenance margin: The minimum amount of margin required to keep your position open.
(USDⓈ-margined contract) Maintenance margin = mark price * position amount * maintenance margin rate
(Coin-margined contract) Maintenance margin = position amount / mark price * maintenance margin rate
liq_pricestringLiquidation price.The estimated trigger price calculated by the system in real time based on the current mark price.The calculation takes into account factors such as position mode (One-way/Hedge Mode), contract type (USDⓈ-margined/Coin-margined), position size, settlement price, margin, maintenance margin, unrealized PNL, and potential risks of unfilled orders.In cross margin mode, positions under the same settlement asset jointly affect the liquidation price; in isolated margin mode, it is calculated independently for that position. The liquidation price may change accordingly when the market price, order status, or account funds change. When no valid liquidation price exists, the interface return value is subject to the actual response.
bkr_pricestringBankruptcy price.
The bankruptcy price in cross margin is no longer calculated.
The bankruptcy price in isolated margin can be calculated using the liquidation price formula, where the maintenance margin rate is 0.
adl_levelintADL (Auto-deleveraging) risk level, a number in the range of [1, 5]. The smaller the number, the lower the risk level, and vice versa.
settle_pricestringSettlement price, calculated as mark price
settle_valuestringSettlement value, calculated as mark price
risk_ratestringPosition risk rate. The calculation considers position margin, unrealized PNL, maintenance margin, and the potential risks of unexecuted orders; the value will be adjusted in real time with changes in mark price, orders, and funds.
created_atintOrder creation time
updated_atintOrder update time
stop_loss_listarrayStop-loss order list
stop_loss_list[].idintStop-loss order ID
stop_loss_list[].pricestringStop-loss price
stop_loss_list[].typestringStop-loss trigger price type
stop_loss_list[].amountstringStop-loss amount
stop_loss_list[].is_allboolWhether this is a full‑position stop‑loss order
stop_loss_list[].created_atintStop-loss order creation time
take_profit_listarrayTake-profit order list
take_profit_list[].idintTake-profit order ID
take_profit_list[].pricestringTake-profit price
take_profit_list[].typestringTake-profit trigger price type
take_profit_list[].amountstringTake-profit amount
take_profit_list[].is_allboolWhether this is a full‑position take-profit order
take_profit_list[].created_atintTake-profit order creation time

Request example

GET /futures/pending-position?market=CETUSDT&market_type=FUTURES&page=1&limit=100

Response example

{
"code": 0,
"message": "OK",
"data": [
{
"position_id": 927266133,
"market": "CETUSDT",
"market_type": "FUTURES",
"side": "long",
"margin_mode": "cross",
"open_interest": "1000000",
"close_avbl": "1000000",
"ath_position_amount": "1000000",
"unrealized_pnl": "8391.123989502",
"realized_pnl": "110396.83471965",
"avg_entry_price": "0.0631",
"cml_position_value": "1118787.958709152",
"max_position_value": "1302421.11392201",
"take_profit_price": "",
"stop_loss_price": "",
"take_profit_type": "",
"stop_loss_type": "",
"leverage": "10",
"margin_avbl": "210396.83471965",
"ath_margin_size": "210396.83471965",
"position_margin_rate": "0.050",
"maintenance_margin_rate": "0.005",
"maintenance_margin_value": "5000",
"liq_price": "0.05679",
"bkr_price": "0.053635",
"adl_level": 5,
"settle_price": "0.06817",
"settle_value": "1291322.83913829",
"risk_rate": "0.1234",
"created_at": 1691482451000,
"updated_at": 1691482451000,
"stop_loss_list": [],
"take_profit_list": []
}
],
"pagination": {
"has_next": false
}
}