> For the complete documentation index, see [llms.txt](https://rwaperp-1.gitbook.io/rwaperp-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rwaperp-1.gitbook.io/rwaperp-docs/trading-mechanics/order-lifecycle.md).

# Order Lifecycle

The lifecycle of a trade on RWAPerp follows a transparent, on-chain verifiable path:

1. Place: The client submits an order via REST API or SDK. The system verifies the account identity and trading permissions using the account-authorized trading key and Ed25519 request signature.
2. Validate: The trading and risk engine connected to RWAPerp validates available collateral, initial margin, minimum notional, price and quantity precision, order size limits, and price protection ranges. Orders that fail validation are rejected.
3. Enter Order Book: Validated orders enter the shared order book connected to RWAPerp. Limit orders wait in the book for matching; Market, IOC, and FOK orders proceed to matching immediately per their execution rules.
4. Match: The underlying matching engine matches orders according to order book rules. Fill records are generated upon matching between Maker and Taker.
5. Fill Confirmation: The system pushes order and fill updates via WebSocket, including fill price, quantity, fees, order status, and remaining quantity.
6. Settlement: The system updates account position, average entry price, realized and unrealized PnL, fees, and margin information. Trade results are settled through the underlying settlement network connected to RWAPerp; deposits and withdrawals are processed through the relevant asset contracts on supported chains.

Signing Method: Standard trading requests use Ed25519 signatures. EIP-712 is primarily used for account registration, adding trading keys, withdrawals, and initiating PnL Settlement.

<br>


---

# 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://rwaperp-1.gitbook.io/rwaperp-docs/trading-mechanics/order-lifecycle.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.
