Skip to main content

Positions

WSProductionwss://ws.btse.com/ws/futuresTestnetwss://testws.btse.io/ws/futures

Pushed when a position changes. Includes a zero-value snapshot when a position is closed. Requires WebSocket authentication. Topic: positionsV3

Response structure is the same as All Position with additional raw internal fields.

Response Content​

NameTypeRequiredDescription
topicStringYesallPositionV4 or positionsV3
dataObject[]YesArray of data objects

Data Object:

NameTypeRequiredDescription
marketNameStringYesMarket name
orderTypeIntegerYes90: Futures position
orderModeIntegerYes66: BUY Β· 83: SELL
entryPriceDoubleYesEntry price
liquidationPriceDoubleYesLiquidation price
markPriceDoubleYesMark price
unrealizedProfitLossDoubleYesUnrealized P&L
totalMaintenanceMarginDoubleYesMaintenance margin
totalContractsDoubleYesContract size
marginTypeIntegerYes91: CROSS Β· 92: ISOLATED
closeOrderBooleanYesWhether a close order exists
liquidationInProgressBooleanYesWhether in liquidation
currentLeverageDoubleYesCurrent leverage
adlScoreBucketDoubleYesADL probability score
takeProfitOrderObjectYesTake profit order info
stopLossOrderObjectYesStop loss order info
positionModeStringYesONE_WAY Β· HEDGE Β· ISOLATED
positionDirectionStringYesPosition direction: LONG Β· SHORT (only present in HEDGE/ISOLATED mode)
positionIdStringYesPosition ID
contractSizeDoubleYesThe position contract size
example

Response

{
"topic": "allPositionV4",
"data": [
{
"marketName": "BTC-PERP",
"orderType": 90,
"orderMode": 66,
"entryPrice": 111085.1,
"liquidationPrice": 0,
"markPrice": 111100,
"unrealizedProfitLoss": 0.01,
"totalMaintenanceMargin": 5.5,
"totalContracts": 1,
"marginType": 91,
"closeOrder": false,
"liquidationInProgress": false,
"currentLeverage": 10,
"adlScoreBucket": 2,
"positionMode": "ONE_WAY",
"positionDirection": "LONG",
"positionId": "BTC-PERP-USDT",
"contractSize": 0.0001
}
]
}