> For the complete documentation index, see [llms.txt](https://docs.unix.market/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unix.market/websocket/user-channels/position.md).

# Position

Push position changes for `address`.

{% hint style="info" %}
**No auth.** Reflects state after each on-chain event.
{% endhint %}

## Subscribe

```json
{ "channel": "position", "address": "0xabc…def" }
```

## When It Pushes

* A fill changed the position size.
* Funding rate settled.
* Isolated margin adjustment (`POST /v1/account/isolated-margin`).
* Leverage change (`POST /v1/account/leverage`).

## Payload

| Field | Type           | REST equivalent                                 |
| :---: | -------------- | ----------------------------------------------- |
|  `s`  | integer        | `symbol_id`                                     |
|  `a`  | string         | `address`                                       |
|  `d`  | string         | `position_side` (`both` / `long` / `short`)     |
|  `m`  | string         | `margin_mode`                                   |
|  `z`  | string         | `open_size` (positive = long, negative = short) |
|  `p`  | string         | `avg_price`                                     |
|  `l`  | integer        | `leverage`                                      |
|  `c`  | string         | `cum_realized_pnl`                              |
|  `v`  | string         | `cum_close_size`                                |
|  `e`  | string         | `cum_close_value`                               |
|  `f`  | string         | `cum_fee`                                       |
|  `h`  | string         | `cum_funding_fee`                               |
|  `w`  | string         | `max_size`                                      |
|  `o`  | string \| null | `isolated_margin` (isolated only)               |
|  `g`  | integer        | `adl_level`                                     |
|  `j`  | integer (ms)   | `created_time`                                  |
|  `t`  | integer (ms)   | `updated_time`                                  |

{% hint style="info" %}
**No price-derived fields** are included (no mark/index/UPnL/liq\_price). Compute these client-side from `position` + a `ticker` subscription if you need them.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.unix.market/websocket/user-channels/position.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
