# 接口概览

Trading API 共提供 **29 个端点**，分为 5 大模块：

## 模块一览

| 模块        | 端点数 | 权限要求                     |
| --------- | --- | ------------------------ |
| 行情        | 4   | `READ_ONLY`              |
| 用户与资产     | 3   | `READ_ONLY`              |
| 订单        | 8   | `READ_ONLY` / `WRITABLE` |
| 现金出入金     | 10  | `READ_ONLY` / `WRITABLE` |
| One Click | 4   | `READ_ONLY` / `WRITABLE` |

## 全部端点

### 行情

| Method | Path                                | 权限          | 说明         |
| ------ | ----------------------------------- | ----------- | ---------- |
| `GET`  | `/api/v1/symbols`                   | `READ_ONLY` | 查询可交易标的列表  |
| `GET`  | `/api/v1/prices/{symbol}`           | `READ_ONLY` | 查询单个标的实时行情 |
| `GET`  | `/api/v1/prices/{symbol}/history`   | `READ_ONLY` | 查询历史 K 线   |
| `GET`  | `/api/v1/underlying/{symbol}/price` | `READ_ONLY` | 查询底层股票行情   |

### 用户与资产

| Method | Path                               | 权限          | 说明     |
| ------ | ---------------------------------- | ----------- | ------ |
| `GET`  | `/api/v1/users/{userId}`           | `READ_ONLY` | 返回用户信息 |
| `GET`  | `/api/v1/users/{userId}/balance`   | `READ_ONLY` | 查询资产组合 |
| `GET`  | `/api/v1/users/{userId}/positions` | `READ_ONLY` | 查询持仓列表 |

### 订单

| Method   | Path                                | 权限          | 说明             |
| -------- | ----------------------------------- | ----------- | -------------- |
| `GET`    | `/api/v1/orders`                    | `READ_ONLY` | 查询订单映射列表       |
| `POST`   | `/api/v1/orders/calldata`           | `WRITABLE`  | 构建下单 calldata  |
| `POST`   | `/api/v1/orders/send`               | `WRITABLE`  | One Click 代发下单 |
| `POST`   | `/api/v1/orders/tx`                 | `WRITABLE`  | 记录自行提交的 txHash |
| `GET`    | `/api/v1/orders/tx/{txHash}`        | `READ_ONLY` | 按 txHash 查询订单  |
| `GET`    | `/api/v1/orders/{orderId}`          | `READ_ONLY` | 查询订单详情         |
| `DELETE` | `/api/v1/orders/{orderId}/calldata` | `WRITABLE`  | 构建撤单 calldata  |
| `DELETE` | `/api/v1/orders/{orderId}/send`     | `WRITABLE`  | One Click 代发撤单 |

### 现金出入金

| Method | Path                                     | 权限          | 说明             |
| ------ | ---------------------------------------- | ----------- | -------------- |
| `POST` | `/api/v1/cash/deposits/calldata`         | `WRITABLE`  | 构建入金 calldata  |
| `POST` | `/api/v1/cash/deposits/send`             | `WRITABLE`  | One Click 代发入金 |
| `POST` | `/api/v1/cash/deposits/tx`               | `WRITABLE`  | 记录入金 txHash    |
| `GET`  | `/api/v1/cash/deposits`                  | `READ_ONLY` | 查询入金记录         |
| `GET`  | `/api/v1/cash/deposits/{operationId}`    | `READ_ONLY` | 查询单笔入金         |
| `POST` | `/api/v1/cash/withdrawals/calldata`      | `WRITABLE`  | 构建出金 calldata  |
| `POST` | `/api/v1/cash/withdrawals/send`          | `WRITABLE`  | One Click 代发出金 |
| `POST` | `/api/v1/cash/withdrawals/tx`            | `WRITABLE`  | 记录出金 txHash    |
| `GET`  | `/api/v1/cash/withdrawals`               | `READ_ONLY` | 查询出金记录         |
| `GET`  | `/api/v1/cash/withdrawals/{operationId}` | `READ_ONLY` | 查询单笔出金         |

### One Click

| Method | Path                  | 权限          | 说明                 |
| ------ | --------------------- | ----------- | ------------------ |
| `GET`  | `/api/v1/1ct/status`  | `READ_ONLY` | 查询授权状态             |
| `POST` | `/api/v1/1ct/prepare` | `WRITABLE`  | 生成 EIP-712 payload |
| `POST` | `/api/v1/1ct/enable`  | `WRITABLE`  | 提交签名开启 One Click   |
| `POST` | `/api/v1/1ct/disable` | `WRITABLE`  | 关闭 One Click       |


---

# Agent Instructions: 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:

```
GET https://docs.anchored.finance/trading-api-docs-zh/api-jie-kou/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
