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

# Position

Name of channel: `position`

Description: Pushes position changes for an address.

URL path: `/v1/public/account`

Authentication: No auth required

Request parameters:

| Parameter | Type   | Required | Description      |
| --------- | ------ | -------- | ---------------- |
| `channel` | string | Yes      | `position`       |
| `address` | string | Yes      | Account address. |

Subscription acknowledgement fields:

| Field     | Type    | Description                                                             |
| --------- | ------- | ----------------------------------------------------------------------- |
| `id`      | string  | Echoes the request `id`. String, max 32 characters, `[A-Za-z0-9]` only. |
| `op`      | string  | `subscribe` or `unsubscribe`.                                           |
| `success` | boolean | Whether at least one subscription succeeded.                            |
| `args`    | array   | Successful subscription args. Present on success.                       |
| `code`    | string  | Error code. Present on failure.                                         |
| `msg`     | string  | Error message. Present on failure.                                      |

Push data parameters:

| Field | Type         | Description                                          |
| ----- | ------------ | ---------------------------------------------------- |
| `s`   | integer      | Symbol ID.                                           |
| `a`   | string       | Account address.                                     |
| `d`   | string       | Position side: `both`, `long`, or `short`.           |
| `m`   | string       | Margin mode.                                         |
| `z`   | string       | Open size. Positive for long and negative for short. |
| `p`   | string       | Average entry price.                                 |
| `l`   | integer      | Leverage.                                            |
| `c`   | string       | Realized PnL.                                        |
| `r`   | string       | Cumulative closed PnL.                               |
| `v`   | string       | Cumulative closed size.                              |
| `e`   | string       | Cumulative closed value.                             |
| `f`   | string       | Cumulative fee.                                      |
| `h`   | string       | Cumulative funding fee.                              |
| `w`   | string       | Maximum position size.                               |
| `o`   | string\|null | Isolated margin.                                     |
| `g`   | integer      | ADL level.                                           |
| `j`   | integer      | Created timestamp.                                   |
| `t`   | integer      | Updated timestamp.                                   |

Request example:

```json
{
  "id": "subPosition",
  "op": "subscribe",
  "args": [
    { "channel": "position", "address": "0xabc000000000000000000000000000000000def0" }
  ]
}
```

Response example, success:

```json
{
  "id": "subPosition",
  "op": "subscribe",
  "success": true,
  "args": [
    { "channel": "position", "address": "0xabc000000000000000000000000000000000def0" }
  ]
}
```

Response example, failure:

```json
{
  "id": "subPosition",
  "op": "subscribe",
  "success": false,
  "code": "10006",
  "msg": "Invalid parameter format"
}
```

Push data example:

```json
{
  "arg": { "channel": "position", "address": "0xabc000000000000000000000000000000000def0" },
  "finality": "final",
  "data": {
    "s": 100001,
    "a": "0xabc000000000000000000000000000000000def0",
    "d": "both",
    "m": "cross",
    "z": "1.0",
    "p": "67500.00",
    "l": 10,
    "c": "0",
    "r": "0",
    "v": "0",
    "e": "0",
    "f": "33.75",
    "h": "0",
    "w": "1.0",
    "o": null,
    "g": 1,
    "j": 1719500000000,
    "t": 1719500000000
  },
  "ts": 1719500000000
}
```


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.ticko.xyz/api-documentation/account/websocket/position.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
