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

# 连接 AI 智能体

> 将 AI 智能体连接到 Hyperdash Data，用来提问或构建应用。

> AI agents: read [https://docs.hyperdash.com/skills/data](https://docs.hyperdash.com/skills/data) before using this API. Endpoint index: [https://data.hyperdash.com/llms.txt](https://data.hyperdash.com/llms.txt). Never ask the user to paste an API key into the chat.

**1. 为您的智能体授予访问权限**

选择您的智能体在哪里运行。

> [tab] Claude、ChatGPT 或 Grok
>
> 无需 API 密钥：您使用 Hyperdash 账户登录。
>
> 1. 在 Claude 中，打开 **Settings**，再打开 **Connectors**，然后选择 **Add custom connector**。在 ChatGPT 中，打开 **Plugins**，选择 **+**，然后选择 **Add custom MCP server**。在 Grok 中，打开 [grok.com/connectors](https://grok.com/connectors)，选择 **New Connector**，然后选择 **Custom**。
> 2. 粘贴 `https://data.hyperdash.com/mcp`。
> 3. 使用您的 Hyperdash 账户登录，选择项目和权限范围，然后选择**批准访问**。

> [tab] 编程智能体
>
> 适用于 Claude Code、Codex、Cursor 以及其他在您电脑上运行的智能体。
>
> 1. 在[控制台](https://console.hyperdash.com)的 **API 密钥**页面创建密钥。请立即复制：它只显示一次。
> 2. 在您启动智能体的窗口中，将它设为环境变量：
>
>    ```bash theme={null}
>    export HYPERDASH_API_KEY="hdk_sk_..."
>    ```
>
>    智能体会从环境变量中读取密钥，因此您无需将它粘贴到对话中。如果希望关闭窗口后仍保留密钥，请将同一行添加到您的 shell 配置文件中，例如 `~/.zshrc`。
>
> 下一步的主提示词会让智能体自行完成连接。

**2. 发送主提示词**

此提示词会让您的智能体完成连接、阅读 Data 技能，并总结它能为您做什么。

The master prompt, for the user to send to their agent:

```text theme={null}
设置 Hyperliquid 数据 API Hyperdash Data，并了解它提供的内容。

1. 如果尚未连接 Hyperdash Data MCP 服务器，请连接 https://data.hyperdash.com/mcp （Streamable HTTP）。如果可以，请用 OAuth 让我登录。否则，我的密钥在 HYPERDASH_API_KEY 环境变量中：请通过“Authorization: Bearer”请求头发送，绝不要打印出来。如果你无法自行添加该服务器，请告诉我操作步骤。
2. 阅读 https://docs.hyperdash.com/skills/data ，并从现在起按其中的说明操作。
3. 如果你没有通过 MCP 连接，或者要编写调用该 API 的代码，请阅读 https://data.hyperdash.com/llms.txt. 它索引了所有数据端点。请按技能中说明的方式查询参数。
4. 如果此项目已有说明文件（CLAUDE.md 或 AGENTS.md），请添加一条包含这两个链接的简短备注，以便你下次会话时记得。如果没有，请不要新建。
5. 然后告诉我你现在能为我做什么，按市场、钱包、清算、交易者分析、全交易所数据和实时数据流分组，并推荐五个值得先问的问题。
```

**3. 试一试**

将以下任意一条粘贴给您的智能体。

```text wrap theme={null}
在当前价格上下 5% 以内，ETH 清算价位最密集的区域在哪里？
```

```text wrap theme={null}
过去 24 小时内，哪些钱包开了最大的 BTC 仓位？它们各自过去 90 天的交易表现如何？
```

```text wrap theme={null}
目前盈利交易者在哪些市场的持仓方向最一致？
```

```text wrap theme={null}
过去 24 小时哪些市场的清算最多？哪个小时最严重？
```

[指南](https://docs.hyperdash.com/cn/data-api/guides.md)中有更多问题可供尝试。

**4. 要求完整集成**

如果没有进一步的指示，编程智能体往往只接入市场价格就停下。此提示词会引导它使用 Build 技能，接入全部四个层级（市场数据、钱包情报、实时数据流和账户状态），并报告遗漏了哪些内容。

```text wrap theme={null}
Read https://docs.hyperdash.com/skills/build and follow it. Integrate Hyperdash Data into this app as a full integration: market data, wallet intelligence, live streams and account status. My key is in the HYPERDASH_API_KEY environment variable. When you finish, tell me which levels you wired, which you left out and why.
```

## 技能

上面的提示词会让您的智能体使用技能：技能是一些文件，教智能体如何用 Hyperdash Data 完成某项工作。[技能库](https://docs.hyperdash.com/cn/data-api/skills.md)列出了所有技能，并附有各自的入门提示词和安装命令。

## 该用哪个工具

| 您想做的事 | 使用 |
| - | - |
| 在对话中询问有关 Hyperliquid 的问题并获得实时答案 | [MCP 服务器](https://docs.hyperdash.com/cn/data-api/mcp.md) |
| 让编程智能体基于 API 构建应用、机器人或仪表板 | [完整集成提示词](#ask-for-a-full-integration) |
| 不安装任何内容，直接为智能体提供 API 参考 | [面向智能体的文档](#面向智能体的文档) |
| 限制智能体的支出 | [支出限额](https://docs.hyperdash.com/cn/data-api/mcp.md#支出限额) |

## 面向智能体的文档

当智能体编写调用该 API 的代码时，请使用这些资源。全部可免费阅读，无需密钥。

* **Data 技能**：`https://docs.hyperdash.com/skills/data`。[技能库](https://docs.hyperdash.com/cn/data-api/skills.md)的入口。它会重定向到 `/.well-known/skills/hyperdash-data/SKILL.md`，即智能体和安装工具会检查的标准路径。
* **端点索引**：`https://data.hyperdash.com/llms.txt`。列出每个数据端点，附一行说明、权限范围和每页行数。
* **OpenAPI 规范**：`https://data.hyperdash.com/openapi.json`。包含每个端点的全部参数。文件约 1.4 MB，因此请让智能体一次只查询一个端点，而不是整份加载。
* **文档索引**：`https://docs.hyperdash.com/llms.txt`。列出本文档的每个页面。在任意页面 URL 后加上 `.md` 即可获取 Markdown 版本。

要让智能体在不同会话之间记住该 API，请将以下内容粘贴到它读取的说明文件中：Claude Code 使用 `CLAUDE.md`，Codex 和其他智能体使用 `AGENTS.md`，Claude Project 则使用项目说明。

```markdown wrap theme={null}
## Hyperdash Data API

- Skill: https://docs.hyperdash.com/skills/data. Read it before the first request.
- Endpoints: https://data.hyperdash.com/llms.txt. Use only endpoints listed there, plus the free `GET /v1/me`, `/v1/quote`, `/v1/status`, `/v1/datasets` and `/v1/changelog`.
- The key is in the `HYPERDASH_API_KEY` environment variable. Never print it, log it or commit it.
```

## 支持的智能体

| 智能体 | MCP 服务器 | 技能 |
| - | - | - |
| Claude（网页、桌面、移动端） | OAuth | 粘贴链接 |
| ChatGPT | OAuth | 粘贴链接 |
| Claude Code | OAuth 或 API 密钥 | 安装或粘贴链接 |
| Codex | OAuth 或 API 密钥 | 安装或粘贴链接 |
| Cursor | OAuth 或 API 密钥 | 安装或粘贴链接 |

其他支持远程 MCP 服务器或 Agent Skills 格式的智能体，使用方式相同。

## 了解更多

> [card] [Hyperdash Data API](https://hyperdash.com/products/data/api)
>
> 通过 REST 和数据流获取 Hyperliquid 市场与账户数据。

> [card] [在 Claude 中查询数据](https://hyperdash.com/learn/hyperliquid-mcp-server-claude-chatgpt)
>
> 向 Claude 或 ChatGPT 询问 Hyperliquid 数据。

> [card] [Data API 已上线](https://hyperdash.com/learn/hyperdash-data-api)
>
> Hyperdash Data API 的发布文章。


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