> ## 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.

# 错误

> 错误格式和 API 返回的所有错误代码。

> 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.

错误采用 RFC 9457 问题详情格式（`application/problem+json`），并带有稳定的 `code`。请根据 `code` 编写分支逻辑，切勿依赖 `title` 或 `detail`。许多错误包含 `hint`，说明如何修复。错误不收取任何费用。多数带有 `X-Credits-Charged: 0` 和 `X-Problem-Code` 响应头。多数 `429` 和 `503` 响应还包含以秒为单位的 `Retry-After`，以及响应体中的 `retry_after_s`。

```json theme={null}
{
  "type": "https://data.hyperdash.com/errors/invalid_parameter",
  "title": "Invalid parameter",
  "status": 400,
  "code": "invalid_parameter",
  "detail": "interval must be one of 1m, 1s, 15s, 30s, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d, 3d, 1w, 1M",
  "request_id": "019a3c4e-7b2d-7f10-9c4a-2e6d1b8f0a53"
}
```

| 状态 | 代码 | 含义与解决方法 |
| - | - | - |
| 400 | `invalid_parameter` | 参数格式错误或超出范围、DEX 筛选条件指定了未知的 DEX、请求体不是有效的 JSON，或者游标已过期或与查询不匹配。 |
| 400 | `range_too_large` | 时间范围超出端点的最大值，或响应会超过 2 MiB（批量端点为 16 MiB）。请缩小范围或调低 `limit`。 |
| 401 | `invalid_key` | 缺少密钥或密钥格式错误。 |
| 401 | `expired_key` | 密钥已过期。请创建新密钥。 |
| 401 | `revoked_key` | 密钥已被撤销。 |
| 403 | `insufficient_scope` | 密钥缺少此端点所需的权限范围。 |
| 403 | `ip_not_allowed` | 来源 IP 不在密钥的允许列表中。 |
| 403 | `plan_required` | 工作区没有有效套餐，因此其密钥停止工作。 |
| 403 | `workspace_suspended` | 工作区已被暂停。[联系支持](https://docs.hyperdash.com/cn/data-api/versioning-support.md#支持)。 |
| 403 | `connection_setup_required` | MCP 连接尚未在控制台中完成设置。错误中带有设置链接：请打开它，完成连接，然后重试。 |
| 403 | `history_limit` | 您的套餐不包含这么久的历史。`detail` 会注明您套餐的历史深度。参见[套餐与限制](https://docs.hyperdash.com/cn/data-api/plans.md)。 |
| 403 | `feature_not_in_plan` | 您的套餐不包含此端点或功能。参见[套餐与限制](https://docs.hyperdash.com/cn/data-api/plans.md#各套餐功能)。 |
| 403 | `credits_exhausted` | 没有剩余积分，或者连接或项目的预算已用完。请在控制台的**账单**页面购买积分、升级套餐、提高预算，或等待预算重置。 |
| 403 | `max_credits_exceeded` | 请求的最高费用超过 `X-Max-Credits`。 |
| 404 | `not_found` | 未知的市场、DEX、代币、金库或其他指定项目，没有历史的地址，或未知路由。路径中的市场名称须与 `GET /v1/markets` 列出的写法一致，例如 `BTC`、`xyz:TSLA` 或 `@107`。 |
| 409 | `idempotency_conflict` | 相同的 `Idempotency-Key` 搭配了不同的请求体。 |
| 409 | `job_not_ready` | 任务没有可读取的结果：它仍在运行（请轮询 `GET /v1/jobs/{id}`），或者已失败、已取消，或结果已在 24 小时后过期。`detail` 会给出状态。 |
| 409 | `price_changed` | 自您发送的 `X-Credit-Price-Version` 之后，该端点的价格已变动。请重新报价。 |
| 409 | `snapshot_expired` | 您正在分页读取的快照已过期。请重新开始。 |
| 429 | `rate_limited` | 请求过多、占用的并发请求槽位过多（每 1,000 行占用一个），或服务器繁忙，正在对发送工作量最大的工作区降速。请等待 `Retry-After`。 |
| 429 | `extraction_limit` | 已达到某项提取限制。`detail` 和 `limits` 数组会说明是哪项限制，以及此请求何时可再次执行；请等待 `Retry-After`。如果单个请求本身就超过限制，则没有 `Retry-After`：请减少请求的行数或钱包数。 |
| 429 | `jobs_limit` | 正在运行的异步任务或当日异步任务过多。 |
| 502 | `upstream_error` | 数据源返回错误。请以退避方式重试。 |
| 503 | `upstream_busy` | 数据源正在自我保护。请在 `Retry-After` 之后重试。 |
| 503 | `unavailable` | 我们目前无法安全地处理该请求，例如服务器短暂过载，或订单簿仍在启动或没有挂单。请在 `Retry-After` 之后重试。 |
| 503 | `extraction_unavailable` | 目前无法检查提取限制。请在 `Retry-After` 之后重试。 |
| 504 | `upstream_timeout` | 数据源超时。请以退避方式重试。 |

## 速率限制与重试

超出[速率限制](https://docs.hyperdash.com/cn/data-api/plans.md#速率限制)的请求会返回 `429`，带有以整秒为单位的 `Retry-After` 响应头，以及响应体中的 `retry_after_s`：

```http theme={null}
HTTP/1.1 429 Too Many Requests
Content-Type: application/problem+json
Retry-After: 1

{
  "type": "https://data.hyperdash.com/errors/rate_limited",
  "title": "Too many requests",
  "status": 429,
  "code": "rate_limited",
  "detail": "Too many concurrent requests for this workspace: this request counts as 5 of your 32 (one per 1,000 rows)",
  "retry_after_s": 1,
  "request_id": "019a3c4e-7b2d-7f10-9c4a-2e6d1b8f0a53"
}
```

请等待 `Retry-After`，此后每次再遇到 `429` 就将等待时间加倍，并加入随机抖动，最长 30 秒。`503 upstream_busy` 和多数 `503 unavailable` 响应也带有 `Retry-After`，请以同样方式重试。被限流的请求免费。

## MCP 和数据流错误

MCP 服务器会在工具结果中返回上述代码；当工具需要的权限范围未授予该连接时，还会返回 `scope_not_approved`。数据流以 `error` 消息发送错误：`ack_timeout`、`already_subscribed` 和 `subscription_superseded` 的说明见[数据流](https://docs.hyperdash.com/cn/data-api/streams.md)页面。

[联系支持](https://docs.hyperdash.com/cn/data-api/versioning-support.md#支持)时，请提供 `request_id`。

## 了解更多

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

> [card] [Hyperliquid API 详解](https://hyperdash.com/learn/hyperliquid-api-explained)
>
> 端点、速率限制和 WebSocket 基础。

> [card] [Data API 详解](https://hyperdash.com/learn/hyperliquid-data-api-explained)
>
> Hyperliquid 数据 API 提供什么，以及如何运作。


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