> 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/order.md).

# Order

Push order state transitions for `address`.

{% hint style="info" %}
**No authentication required** — any address is publicly observable. This is by design; UniX is on-chain.
{% endhint %}

## Subscribe

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

## Push Timing

| Event                   | `e` value                                      |
| ----------------------- | ---------------------------------------------- |
| Order accepted          | `new` / `pending_trigger` / `inactive`         |
| Partial fill            | `partially_filled`                             |
| Full fill               | `filled`                                       |
| Cancellation            | `canceled`                                     |
| Rejection               | `rejected`                                     |
| Modify                  | Updated full Order object                      |
| Conditional triggered   | `triggered`, plus the child order's `new` push |
| Attached TPSL activated | `e`: `inactive` → `pending_trigger`            |

## Payload

See [Order Object](file:///reference/order-object.md) for full type definitions.

| Field | REST equivalent                               |
| :---: | --------------------------------------------- |
|  `i`  | `order_id`                                    |
|  `k`  | `client_order_id`                             |
|  `a`  | `address`                                     |
|  `b`  | `created_time`                                |
|  `u`  | `updated_time`                                |
|  `s`  | `symbol_id`                                   |
|  `d`  | `is_buy` (bool: `true` = buy, `false` = sell) |
|  `o`  | `order_type`                                  |
|  `g`  | `algo_order_type`                             |
|  `f`  | `time_in_force`                               |
|  `q`  | `quantity`                                    |
|  `p`  | `price`                                       |
|  `z`  | `price_match`                                 |
|  `j`  | `slippage`                                    |
|  `w`  | `position_side`                               |
|  `m`  | `margin_mode`                                 |
|  `y`  | `market_order_type`                           |
|  `n`  | `stp_mode`                                    |
|  `r`  | `flags`                                       |
|  `e`  | `state`                                       |
|  `fq` | `cum_filled_quantity`                         |
|  `fa` | `cum_filled_amount`                           |
|  `rq` | `remaining_quantity`                          |
|  `oq` | `original_quantity`                           |
|  `cf` | `cum_fee`                                     |
|  `os` | `order_source`                                |
|  `cd` | `conditional`                                 |
|  `t`  | `tpsl`                                        |
|  `l`  | `parent_order_id`                             |
|  `h`  | `leverage`                                    |
|  `x`  | `tx_hash`                                     |

## Nested Compact Objects

`cd` maps conditional fields as `cp` = trigger price and `cb` = trigger source.

`t` maps TPSL fields as `tm` = mode, `tp` / `sp` = take-profit / stop-loss trigger price, `tb` / `sb` = trigger source, `tt` / `st` = triggered order type, and `to` / `so` = triggered limit price.

## Example Push (Partial Fill)

```json
{
  "channel": "order",
  "address": "0xabc…def",
  "ts": 1719500000150,
  "finality": "final",
  "data": {
    "i": "144115188075855872",
    "k": "my-order-1",
    "s": 100001,
    "d": true,
    "e": "partially_filled",
    "fq": "0.30",
    "fa": "20250.00",
    "rq": "0.70",
    "x": "0xt×_hash…",
    "u": 1719500000120
  }
}
```


---

# 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/order.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.
