> 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/rwa-perp-b2b-api/rest-api-reference.md).

# REST API reference

Complete endpoint inventory grouped by domain.

Base URL: `https://api-trade.rwaperp.xyz`. This reference contains **145** endpoints grouped by domain. Open an endpoint from the tables below to view its parameters, request body, response fields, authentication requirement, and rate limit.

The parameter and response schemas for 139 endpoints are adapted from the published API schema supplied for this integration. RWA Perp's base URL, `RWA-*` authentication headers, X Layer restriction, and RWA-specific signing flows are authoritative for this document.

Three RWA-specific operations—`POST /v1/public/query`, `POST /v1/register_dex_account`, and `POST /v1/dex_api_key`—are documented in the local integration guides. The remaining three paths without an exact schema match are retained and clearly marked as requiring confirmation against the RWA Perp gateway contract.

General request and response conventions are documented in the REST API overview.

* **Auth = None**: call directly
* **Auth = RWA**: see request signing
* **Auth = Wallet**: `register_dex_account` / `dex_api_key`
* **Auth = Wallet + RWA**: `withdraw_request` (Withdrawals)

| Section                      | Count | Typical response `data` shape          |
| ---------------------------- | ----- | -------------------------------------- |
| A.1 Public market data       | 34    | Single object or `{ rows }`            |
| A.2 Candles / TradingView    | 5     | Chart series / config                  |
| A.3 Trading and orders       | 25    | Order object or `{ rows }`             |
| A.4 Positions and leverage   | 14    | Position `{ rows }` or a single symbol |
| A.5 Account                  | 12    | Account / statistics object            |
| A.6 Funds and settlement     | 15    | `{ rows, meta }` history               |
| A.7 Registration and keys    | 4     | Single object                          |
| A.8 Strategy Vault (private) | 10    | `{ rows }` or operation result         |
| A.9–A.13                     | 26    | Per-domain lists or operation results  |

For public GET endpoints, replace `{symbol}` with a value such as `PERP_ETH_USDC`. Endpoints that require a query string, such as `market_trades`, accept parameters in the form `?symbol=...&limit=...`; missing parameters usually return `400` with `success:false`.


---

# 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/rwa-perp-b2b-api/rest-api-reference.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.
