> For the complete documentation index, see [llms.txt](https://docs.synfutures.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.synfutures.com/rwa-trading-apis/trading/order-status-and-history.md).

# Order Status & History

## Record self-submitted order tx

```
POST /api/v1/orders/tx
```

| Field    | Type   | Required | Description                |
| -------- | ------ | -------- | -------------------------- |
| `txHash` | string | Yes      | On-chain transaction hash. |

Indexer backfills `orderId` from chain events.

> Same `txHash` from the same API key returns the existing mapping. A `txHash` already owned by another key returns an error.

## Query orders

### List mappings

```
GET /api/v1/orders?page=1&limit=10
```

### By tx hash

```
GET /api/v1/orders/tx/{txHash}
```

### By order ID

```
GET /api/v1/orders/{orderId}
```

`orderId` must belong to a mapping recorded by the current API key.

## Order detail fields

**openOrder:**

| Field           | Type   | Description                                                       |
| --------------- | ------ | ----------------------------------------------------------------- |
| `orderId`       | string | On-chain order ID.                                                |
| `userAddress`   | string | User address.                                                     |
| `side`          | string | `Buy` or `Sell`.                                                  |
| `type`          | string | `Market` or `Limit`.                                              |
| `tif`           | string | Time in force.                                                    |
| `symbol`        | string | Symbol.                                                           |
| `placeNotional` | string | Order notional (`0` for limit orders, which use `placeQuantity`). |
| `placeQuantity` | string | Order quantity.                                                   |
| `pay`           | string | Payment amount.                                                   |
| `placePrice`    | string | Order (limit) price.                                              |
| `status`        | string | `placing` or `canceling`.                                         |

**historyOrder** adds:

| Field           | Type          | Description      |
| --------------- | ------------- | ---------------- |
| `settleTxHash`  | string / null | Settlement tx.   |
| `settlePrice`   | string        | Execution price. |
| `settlePay`     | string / null | Actual payment.  |
| `settleReceive` | string / null | Actual received. |
| `mintFee`       | string        | Mint fee.        |
| `protocolFee`   | string        | Protocol fee.    |

See [reference/enums.md](/rwa-trading-apis/reference/enums.md) for status values.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.synfutures.com/rwa-trading-apis/trading/order-status-and-history.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
