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

# Quick start

Install dependencies and run the end-to-end example.

## Quick start

Complete account onboarding before running the trading example. The onboarding process creates the trading account and returns the API credentials required below.

> **Production environment:** These examples connect to `https://api-trade.rwaperp.xyz`. The default command performs read-only queries. The `--with-order` option submits and cancels a real order using real account funds.

```bash
pip install eth-account base58 cryptography pynacl websocket-client
export RWA_ACCOUNT_ID="0x..."
export RWA_API_KEY="ed25519:..."
export RWA_SECRET_B58="..."
# After saving the trading example as trading-mainline.py:
python3 trading-mainline.py
python3 trading-mainline.py --with-order   # submits and cancels a real order; requires sufficient USDC
```

**Chain restriction: X Layer only (`chainId = 196`). No other chain is supported.** Do not use Avalanche, Arbitrum, Base or any other `CHAIN_ID` when opening an account or binding a key.

| What you need                      | Section            |
| ---------------------------------- | ------------------ |
| Trading workflow and sample script | Trading workflow   |
| RWA request signing                | Request signing    |
| Response format                    | REST API overview  |
| Complete endpoint documentation    | REST API reference |
| Withdrawals                        | Withdrawals        |

Trading pairs: `PERP_{BASE}_{QUOTE}` (e.g. `PERP_ETH_USDC`).


---

# 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/quick-start.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.
