> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qfex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API 简介

> QFEX REST、CLI 与 WebSocket 接入概览

QFEX 通过以下接口统一提供交易、市场数据和账户操作：

* **REST API**：账户数据、账户管理，以及[程序化出入金](https://docs.qfex.com/cn/api-reference/programmatic-funding.md)。
* **CLI**：面向人工操作员和 AI 智能体、仅返回 JSON 的命令行接口。
* **WebSocket**：低延迟实时市场数据及订单提交。

如需将 QFEX 接入智能体交易工作流，但不想直接管理 WebSocket 连接，请使用 [QFEX CLI](https://docs.qfex.com/cn/api-reference/cli.md)。

## 身份认证

私有账户操作及交易请求需要认证。长期运行的服务端集成可使用 [API 密钥](https://docs.qfex.com/cn/api-reference/api-keys.md)；也可以通过签署以太坊 SIWE 消息进行[钱包认证](https://docs.qfex.com/cn/api-reference/wallet-authentication.md)，创建用户会话。

## REST API 版本

向 `api.qfex.com` 发送的请求默认使用最新接口契约，除非显式提供 `api_version` 查询参数。指定已发布日期可固定请求和响应格式。支持的版本、请求示例以及版本选择器的使用方式，请参阅 [API 版本管理](https://docs.qfex.com/cn/api-reference/versioning.md)。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.