Appearance
Open futures position updated
SEND Server to Client on wss://api.valr.com/ws/account
Sent when a futures position on your account has been updated. Includes position details such as side, quantity, PnL, average entry price, and leverage tier.
Authentication
This operation requires API key authentication (HMAC-SHA512 via query parameters or in-band AUTHENTICATE message).
Message
Event type: OPEN_POSITION_UPDATE
Payload Schema
| Property | Type | Required | Description |
|---|---|---|---|
| pair | string | Yes | - |
| side | string | Yes | - |
| quantity | string | Yes | - |
| realisedPnl | string | Yes | - |
| totalSessionEntryQuantity | string | Yes | - |
| totalSessionValue | string | Yes | - |
| sessionAverageEntryPrice | string | Yes | - |
| averageEntryPrice | string | Yes | - |
| unrealisedPnl | string | Yes | - |
| updatedAt | string | Yes | - |
| createdAt | string | Yes | - |
| positionId | string | Yes | - |
| leverageTier | integer (int32) | Yes | - |
Example
json
"{\n \"type\": \"OPEN_POSITION_UPDATE\",\n \"data\": {\n \"pair\": \"BTCUSDTPERP\",\n \"side\": \"buy\",\n \"quantity\": \"0.0003\",\n \"realisedPnl\": \"0.08067945\",\n \"totalSessionEntryQuantity\": \"0.0003\",\n \"totalSessionValue\": \"10.9272\",\n \"sessionAverageEntryPrice\": \"36424\",\n \"averageEntryPrice\": \"36137\",\n \"unrealisedPnl\": \"-0.0567\",\n \"updatedAt\": \"2023-11-16T18:57:38.013Z\",\n \"createdAt\": \"2023-11-15T11:34:38.186Z\",\n \"positionId\": \"08dea401-ba23-ded0-28a9-03d6d59c32a4\",\n \"leverageTier\": 27\n }\n}"Channel
Channel: account Address: wss://api.valr.com/ws/account