> For the complete documentation index, see [llms.txt](https://docs.anchored.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.anchored.finance/trading-api/getting-started/conventions.md).

# Conventions

## Base URL

Production environment:

```
https://rwa-api.anchored.finance/rwa/trading
```

All API paths start with `/api/v1`:

```
GET /api/v1/symbols
```

Full production URL:

```
https://rwa-api.anchored.finance/rwa/trading/api/v1/symbols
```

> **HMAC authentication note:** For HMAC calculation, the `URI` only uses `/api/v1/symbols` — not the domain or `/rwa/trading` prefix.

## Unified response structure

All endpoints return:

| Field    | Type                  | Description                       |
| -------- | --------------------- | --------------------------------- |
| `code`   | number                | Business status. `200` = success. |
| `errMsg` | string                | Error message. Empty on success.  |
| `data`   | object / array / null | Payload.                          |
| `uuid`   | string / null         | Request UUID.                     |
| `t`      | number / null         | Server timestamp.                 |

Success example:

```json
{
  "code": 200,
  "errMsg": "",
  "data": {
    "symbol": "AAPL"
  },
  "uuid": null,
  "t": null
}
```

### Pagination

Paginated `data`:

| Field   | Type   | Description             |
| ------- | ------ | ----------------------- |
| `total` | number | Total matching records. |
| `rows`  | array  | Current page.           |

Parameters:

| Parameter | Default | Constraints                        |
| --------- | ------- | ---------------------------------- |
| `page`    | `1`     | Treated as `1` if < 1.             |
| `limit`   | `10`    | Treated as `10` if < 1; max `100`. |

## Error handling

Business errors use HTTP `400` with `code` and `errMsg` in the body.

| code    | errMsg                  | Common cause                                                  |
| ------- | ----------------------- | ------------------------------------------------------------- |
| `401`   | `Unauthorized`          | Invalid key, signature, nonce, timestamp, IP, or permissions. |
| `500`   | `Server internal error` | Validation failure, missing config, downstream error.         |
| `10000` | `Unsupported chainId`   | `x-api-chain-id` not supported.                               |
| `10001` | `Unsupported product`   | `x-api-p` not in public list.                                 |
| `10002` | `ChainId is missing`    | Missing chain ID header.                                      |
| `10003` | `Product Id is missing` | Missing product type header.                                  |


---

# 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://docs.anchored.finance/trading-api/getting-started/conventions.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.
