> 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/getting-started/conventions.md).

# Conventions

## Base URL

Production environment:

```
https://base-api.synfutures.com/rwa/trading
```

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

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

Full production URL:

```
https://base-api.synfutures.com/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 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/getting-started/conventions.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.
