> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.6mm.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.6mm.com/_mcp/server.

# 环境与通用约定

> 查看 6MM API 环境以及基础地址、时间戳、数字字段、交易对、请求 ID、分页和响应等通用约定。

<h2 id="service-endpoints">
  服务地址
</h2>

| 类型        | 地址                    |
| --------- | --------------------- |
| REST API  | `https://api.6mm.com` |
| WebSocket | `wss://ws.6mm.com/ws` |

<h2 id="time-and-numeric-values">
  时间与数字
</h2>

* 除特别说明外，时间字段均为 Unix 毫秒时间戳。
* 涉及日统计、余额快照、成交量统计等口径默认使用 UTC 日切。
* 金额、价格、数量、费率等精度敏感字段均使用字符串传输。
* `orderId`、`conditionId`、`strategyId` 等大整数 ID 在 JSON 中按字符串返回。

<h2 id="response-format">
  响应格式
</h2>

成功响应：

```json
{
  "code": 0,
  "message": "success",
  "data": {},
  "requestId": "req-12345678"
}
```

错误响应：

```json
{
  "code": 1003,
  "message": "Invalid token",
  "requestId": "req-12345678"
}
```

说明：

* 业务错误通常仍返回统一 JSON 结构，接入方应优先判断 `code`。
* 鉴权失败类错误可能返回 HTTP `401`；限流可能返回 HTTP `429`。
* 可以在请求头传 `X-Request-ID`，服务端会透传到响应的 `requestId`。

<h2 id="related-documentation">
  相关文档
</h2>

* [身份认证](/zh-CN/developer-api/authentication)：选择 JWT 或 API Key 签名。
* [请求签名](/zh-CN/developer-api/request-signing)：构造并校验签名请求。
* [REST API](/zh-CN/developer-api/rest-api)：把通用规则应用到各接口分组。
* [错误码与故障排查](/zh-CN/developer-api/error-codes-and-troubleshooting)：诊断 HTTP 和业务错误。