Skip to main content

Position

Subscribe to the position.event topic to receive real-time Event Contract position updates.

Topic: position.event

info
  • Authentication is required before subscribing to private topics.
  • Pushed when a new Event Contract position is created, position value changes (partial fill), or position is settled (cumClosedPnl updated).

Response Parameters

ParameterTypeComments
idstringMessage ID
topicstringTopic name
creationTimenumberData created timestamp (ms)
dataarrayObject
> symbolstringSymbol name
> baseCoinstringBase coin
> settleCoinstringSettle coin
> sidestringPosition side: Buy (long), Sell (short)
> ecContractTypestringEvent contract type: UpDown, Target, Range
> ecDirectionstringDirection: UP/DOWN (UpDown type), ABOVE/BELOW (Target type), RANGE_IN/RANGE_OUT (Range type)
> avgPayoutRatiostringAverage payout ratio
> positionValuestringPosition value (cumulative executed value)
> ecSettleTimestringExpected settlement time in milliseconds
> cumClosedPnlstringCumulative settled profit and loss
> createdTimestringPosition creation timestamp in milliseconds
> updatedTimestringPosition update timestamp in milliseconds
> seqlongCross sequence number for ordering

Subscribe Example

{
"op": "subscribe",
"args": [
"position.event"
]
}

Stream Example

{
"id": "592324d2bce751-ad38-48eb-8f42-4671d1fb4d4e",
"topic": "position.event",
"creationTime": 1694515703798,
"data": [
{
"symbol": "ETHUSDT-28AUG26-2450-2570-OUT",
"baseCoin": "BTC",
"settleCoin": "USDT",
"side": "Buy",
"ecContractType": "UpDown",
"ecDirection": "UP",
"avgPayoutRatio": "1.85",
"positionValue": "100",
"ecSettleTime": "1694515498753",
"cumClosedPnl": "50.5",
"createdTime": "1694402559843",
"updatedTime": "1694515498753",
"seq": 31413030
}
]
}