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 (
cumClosedPnlupdated).
Response Parameters
| Parameter | Type | Comments |
|---|---|---|
| id | string | Message ID |
| topic | string | Topic name |
| creationTime | number | Data created timestamp (ms) |
| data | array | Object |
| > symbol | string | Symbol name |
| > baseCoin | string | Base coin |
| > settleCoin | string | Settle coin |
| > side | string | Position side: Buy (long), Sell (short) |
| > ecContractType | string | Event contract type: UpDown, Target, Range |
| > ecDirection | string | Direction: UP/DOWN (UpDown type), ABOVE/BELOW (Target type), RANGE_IN/RANGE_OUT (Range type) |
| > avgPayoutRatio | string | Average payout ratio |
| > positionValue | string | Position value (cumulative executed value) |
| > ecSettleTime | string | Expected settlement time in milliseconds |
| > cumClosedPnl | string | Cumulative settled profit and loss |
| > createdTime | string | Position creation timestamp in milliseconds |
| > updatedTime | string | Position update timestamp in milliseconds |
| > seq | long | Cross 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
}
]
}