Skip to main content

Position Channel

Description

Subscribe the position channel

Data will be pushed when the following events occurred:

  1. Open/Close orders are created
  2. Open/Close orders are filled
  3. Orders are canceled
Request Example
{
"op": "subscribe",
"args": [
{
"instType": "USDT-FUTURES",
"channel": "positions",
"instId": "default"
}
]
}

Request Parameters

ParameterTypeRequiredDescription
opStringYesOperation, subscribe unsubscribe
argsList<Object>YesList of channels to request subscription
> channelStringYesChannel name: positions
> instTypeStringYesProduct type
USDT-FUTURES USDT professional futures
COIN-FUTURES Mixed futures
USDC-FUTURES USDC professional futures
SUSDT-FUTURES USDT professional futures demo
SCOIN-FUTURES Mixed futures demo
SUSDC-FUTURES USDC professional futures demo
> instIdStringYesSymbol name,defaultrepresents all the symbols,Only default is supported now
Response Example
{
"event": "subscribe",
"arg": {
"instType": "USDT-FUTURES",
"channel": "positions",
"instId": "default"
}
}

Response Parameters

ParameterTypeDescription
eventStringEvent
argObjectSubscribed channels
> channelStringChannel name: positions
> instTypeStringProduct type
USDT-FUTURES USDT professional futures
COIN-FUTURES Mixed futures
USDC-FUTURES USDC professional futures
SUSDT-FUTURES USDT professional futures demo
SCOIN-FUTURES Mixed futures demo
SUSDC-FUTURES USDC professional futures demo
> instIdStringdefault
codeStringError code
msgStringError message
Push Data
{
"action": "snapshot",
"arg": {
"instType": "USDT-FUTURES",
"channel": "positions",
"instId": "default"
},
"data": [
{
"posId": "1",
"instId": "ETHUSDT",
"marginCoin": "USDT",
"marginSize": "9.5",
"marginMode": "crossed",
"holdSide": "short",
"posMode": "hedge_mode",
"total": "0.1",
"available": "0.1",
"frozen": "0",
"openPriceAvg": "1900",
"leverage": 20,
"achievedProfits": "0",
"unrealizedPL": "0",
"unrealizedPLR": "0",
"liquidationPrice": "5788.108475905242",
"keepMarginRate": "0.005",
"marginRate": "0.004416374196",
"cTime": "1695649246169",
"breakEvenPrice": "24778.97",
"totalFee": "1.45",
"deductedFee": "0.388",
"uTime": "1695711602568",
"autoMargin": "off"
}
],
"ts": 1695717430441
}

Push Parameters

ParameterTypeDescription
actionString'snapshot'
argObjectChannels with successful subscription
> channelStringChannel name: positions
> instTypeStringProduct type
USDT-FUTURES USDT professional futures
COIN-FUTURES Mixed futures
USDC-FUTURES USDC professional futures
SUSDT-FUTURES USDT professional futures demo
SCOIN-FUTURES Mixed futures demo
SUSDC-FUTURES USDC professional futures demo
> instIdStringdefault
dataList<Object>Subscription data
> posIdStringPosition ID
> instIdStringProduct ID,
delivery contract reference:https://www.bitget.com/api-doc/common/release-note
> marginCoinStringCurrency of occupied margin
> marginSizeStringOccupied margin (amount)
> marginModeStringMargin mode
> holdSideStringPosition direction
> posModeStringPosition mode
> totalStringOpen position size
> availableStringSize of positions that can be closed
> frozenStringAmount of frozen margin
> openPriceAvgStringAverage entry price
> leverageStringLeverage
> achievedProfitsStringRealized PnL
> unrealizedPLStringUnrealized PnL
> unrealizedPLRStringUnrealized ROI
> liquidationPriceStringEstimated liquidation price
> keepMarginRateStringMaintenance margin rate
> isolatedMarginRateStringActual margin ratio under isolated margin mode
> marginRateStringOccupancy rate of margin
> breakEvenPriceStringPosition breakeven price
> totalFeeStringFunding fee, the accumulated value of funding fee during the position,The initial value is empty, indicating that no funding fee has been charged yet.
> deductedFeeStringDeducted transaction fees: transaction fees deducted during the position
> cTimeStringPosition creation time, milliseconds format of Unix timestamp, e.g.1597026383085
> uTimeStringLastest position update time, milliseconds format of Unix timestamp, e.g.1597026383085

How was your Reading Experience with us?