# Event: POSITION_UPDATE

## Event Description

A position was opened, changed or closed.

## Event Name

`POSITION_UPDATE`

## Response Example

```json
{
  "e": "POSITION_UPDATE",
  "E": 1789012400000,
  "L": 100123,
  "x": "UPDATE",
  "p": 44412345,
  "s": "XAUUSD",
  "S": "BUY",
  "v": "0.10",
  "po": "2331.42",
  "pc": "2331.15",
  "sl": "2320.00",
  "tp": "2350.00",
  "up": "-2.7000",
  "sw": "0.0000",
  "ot": 1789012345000,
  "ut": 1789012400000
}
```

| Field | Type | Description |
| - | - | - |
| `e` | STRING | `"POSITION_UPDATE"` |
| `E` | LONG | Event time, Unix ms. |
| `L` | LONG | Login. |
| `x` | ENUM | `NEW` (position opened), `UPDATE` (volume, SL/TP, price or profit changed), `CLOSE` (position no longer exists). |
| `p` | LONG | Position id. |
| `s` | STRING | Symbol. |
| `S` | ENUM | `BUY` or `SELL`. |
| `v` | DECIMAL | Current open volume, lots. Reduced by a partial close. |
| `po` | DECIMAL | Volume-weighted open price. |
| `pc` | DECIMAL | Current price at the time of the event. |
| `sl` | DECIMAL | Stop loss. `"0"` if none. |
| `tp` | DECIMAL | Take profit. `"0"` if none. |
| `up` | DECIMAL | Floating (unrealised) profit, in the account's deposit currency. Excludes swap and commission. |
| `sw` | DECIMAL | Swap accumulated on the position. |
| `ot` | LONG | Position open time, Unix ms. |
| `ut` | LONG | Position last-update time, Unix ms. |

> **`up` is not tick-fresh.** The trade server recomputes floating profit on a refresh cadence of a
> few **seconds**, and `POSITION_UPDATE` fires when that number (or anything else on the position)
> changes — not on every tick. This is the trade server's own figure, which is why it reconciles
> with the account statement.
>
> If you need per-tick mark-to-market, compute it from the [`@tick`](/websocket-market-streams/tick-stream.md)
> stream and `po`. Use `up` for anything that must agree with the broker.

`x: "CLOSE"` means the position is gone. The matching `DEAL` with `en: "OUT"` carries the realised
profit; `up` on the close event is not a realised figure.
