Skip to main content

Position

Subscribe to the position stream to see changes to your position size, position setting changes, etc.

Covers: USDT Perpetual, Inverse Perpetual, Inverse Future

Topic: user.position.contractAccount

Response Parameters

ParameterTypeComments
topicstringTopic name
dataarrayObject
> symbolstringSymbol name
> riskIdintegerRisk limit id
> riskLimitValuestringRisk limit value
> sidestringSide. Buy,Sell
> sizestringPosition size
> entryPricestringAverage entry price
> positionValuestringEntry position value
> 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
> tradeModeintegerTrade mode. 0: cross margin, 1: isolated margin
> autoAddMarginintegerAuto add margin. 0: false, 1: true
> leveragestringPosition leverage
> positionBalancestringPosition margin
> markPricestringMark price
> liqPricestringLiquidation price. It returns value only when minPrice < liqPrice < maxPrice
> bustPricestringBankruptcy price
> tpSlModestringDepreciated, meaningless here, always "Full"
> takeProfitstringTake profit price
> stopLossstringStop loss price
> trailingStopstringTrailing stop
> activePricestringTrailing stop trigger price
> unrealisedPnlstringUnrealised PnL
> cumRealisedPnlstringCumulative realized P&L
> occClosingFeestringPosition closing fee occupied
> sessionAvgPricestringSettlement price
> positionStatusstringPosition status
> positionMMstringPosition Initial margin
> positionIMstringPosition Maintenance margin
> createdTimestringPosition created timestamp (ms)
> updatedTimestringPosition data updated timestamp (ms)
> adlRankIndicatorintegerAuto-deleverage rank indicator. What is Auto-Deleveraging?
> isReduceOnlybooleanUseful when Bybit lower the risk limit
  • true: Only allowed to reduce the position. You can consider a series of measures, e.g., lower the risk limit, decrease leverage or reduce the position, add margin, or cancel orders, after these operations, you can call confirm new risk limit endpoint to check if your position can be removed the reduceOnly mark
  • false: There is no restriction, and it means your position is under the risk when the risk limit is systematically adjusted
  • Only meaningful for isolated margin & cross margin of USDT Perp, USDC Perp, USDC Futures, Inverse Perp and Inverse Futures, meaningless for others
> mmrSysUpdatedTimestringUseful when Bybit lower the risk limit
  • When isReduceOnly=true: the timestamp (ms) when the MMR will be forcibly adjusted by the system
  • When isReduceOnly=false: the timestamp when the MMR had been adjusted by system
  • It returns the timestamp when the system operates, and if you manually operate, there is no timestamp
  • Keeps "" by default, if there was a lower risk limit system adjustment previously, it shows that system operation timestamp
  • Only meaningful for isolated margin & cross margin of USDT Perp, USDC Perp, USDC Futures, Inverse Perp and Inverse Futures, meaningless for others
> leverageSysUpdatedTimestringUseful when Bybit lower the risk limit
  • When isReduceOnly=true: the timestamp (ms) when the leverage will be forcibly adjusted by the system
  • When isReduceOnly=false: the timestamp when the leverage had been adjusted by system
  • It returns the timestamp when the system operates, and if you manually operate, there is no timestamp
  • Keeps "" by default, if there was a lower risk limit system adjustment previously, it shows that system operation timestamp
  • Only meaningful for isolated margin & cross margin of USDT Perp, USDC Perp, USDC Futures, Inverse Perp and Inverse Futures, meaningless for others

Stream Example

{
"topic": "user.position.contractAccount",
"data": [
{
"positionIdx": 0,
"riskId": 1,
"symbol": "ARBUSDT",
"side": "None",
"size": "0",
"positionValue": "0",
"entryPrice": "0",
"tradeMode": 0,
"autoAddMargin": 0,
"leverage": "10",
"positionBalance": "0",
"liqPrice": "",
"bustPrice": "0.0000",
"takeProfit": "0.0000",
"stopLoss": "0.0000",
"trailingStop": "0.0000",
"unrealisedPnl": "0",
"createdTime": "1695115891722",
"updatedTime": "1697686565866",
"tpSlMode": "Full",
"sessionAvgPrice": "0.0000",
"positionStatus": "Normal",
"occClosingFee": "0",
"markPrice": "0.7747",
"cumRealisedPnl": "21.84890946",
"activePrice": "0.0000",
"riskLimitValue": "200000",
"positionMM": "0",
"positionIM": "0",
"adlRankIndicator": 0,
"isReduceOnly": false,
"mmrSysUpdateTime": "",
"leverageSysUpdatedTime": ""
}
]
}