> For the complete documentation index, see [llms.txt](https://minara.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://minara.ai/docs/minara-handbook/zh/jiao-yi/agent-api.md).

# API

Minara Agent API 通过标准 HTTP 接口，让开发者、交易者和市场分析师能够直接访问 Minara 的金融情报和交易执行能力。

<figure><img src="/files/45c3fa9ed964496e7833c5b4f47caa712ea40013" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
API 密钥访问需要 **专业版** 计划订阅。在 Lite 和 Starter 计划中，你个人资料里的 API 选项卡会显示升级提示，而不是密钥创建界面。通过 x402 的按使用付费没有计划要求。
{% endhint %}

### API 能做什么

查询涵盖加密货币和股票的实时市场数据：钱包活动、DeFi 指标、链上资金流、alpha 信号。所有响应都针对代理使用而结构化。

发送市场背景查询，并获得做多或做空建议，以及可立即执行的预设订单载荷。这缩短了从信号到交易的循环。

用简单英语描述一笔交易；API 会返回可执行的链上交易载荷，默认兼容 OKX DEX。

查询 AI 估计的事件结果概率分布，适用于预测市场，基于市场数据、新闻背景和不确定性区间。可用它识别定价失衡的赔率，并以更清晰的风险边界调整仓位规模。

### 工作原理

两种计费方式：

1. API 密钥，适用于 Pro 计划。你可以在 Minara 个人资料中生成密钥，并将其包含在 `Authorization` 请求头中。
2. 通过按使用付费 [x402 协议](https://www.x402.org/)x402。每个请求都使用 USDC 等稳定币支付；无需计划订阅。

### 开始使用

* [身份验证](/docs/minara-handbook/zh/jiao-yi/agent-api/authentication.md)：根据每种计费方式请求如何进行身份验证。
* [API 密钥](/docs/minara-handbook/zh/jiao-yi/agent-api/api-key.md)：在 Pro 计划中生成和管理密钥。
* [x402](/docs/minara-handbook/zh/jiao-yi/agent-api/x402.md)：使用稳定币按请求付费。
* [API 参考（API 密钥）](/docs/minara-handbook/zh/jiao-yi/agent-api/api-reference-api-key.md)：API 密钥流程的完整端点规范。
* [API 参考（x402）](/docs/minara-handbook/zh/jiao-yi/agent-api/api-reference-x402.md)：x402 流程的完整端点规范。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://minara.ai/docs/minara-handbook/zh/jiao-yi/agent-api.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.
