内容
# 誓言评分
> 每个 API 都做出承诺。誓言评分检查收据。
**AI 代理的信任层。** 两个产品:
1. **`/now`** — 返回交易代理当前世界状态的单个端点。交易所状态、波动性、事件、制度、数据健康状况 — 一次调用。
2. **誓言评分** — 独立、持续验证数据 API 的准确性、正常运行时间、新鲜度和可靠性。数据 API 的信用局。
## 对于 AI 代理
```bash
# 现在发生了什么?
curl https://api.oathscore.dev/now
# 我应该信任这个数据源吗?
curl https://api.oathscore.dev/score/curistat
# 比较两个数据源
curl https://api.oathscore.dev/compare?apis=curistat,alphavantage
```
## 对于 MCP 兼容的代理(Claude Code、Cursor 等)
```json
{
"mcpServers": {
"oathscore": {
"command": "python",
"args": ["-m", "oathscore_mcp"]
}
}
}
```
需要:`pip install httpx mcp[cli]` 并克隆此仓库。
## MCP 工具
| 工具 | 描述 |
|------|-------------|
| `get_now` | 当前世界状态:交易所、波动性、事件、数据健康状况 |
| `get_exchanges` | 7 个交易所的开启/关闭状态及下一个转换时间 |
| `get_volatility` | VIX、VIX9D、VIX3M、VVIX、SKEW、期限结构 |
| `get_events` | 下一个事件、FOMC/CPI 倒计时、本周高影响力计数 |
| `get_score` | 特定 API 的誓言评分(0-100 综合评分 + 等级) |
| `compare_apis` | 两个或多个数据 API 的并排比较 |
| `get_alerts` | 监控 API 的主动降级警报 |
| `check_health` | 服务健康状况和数据新鲜度 |
## 誓言评分监控的内容
对于每个评级 API:
| 指标 | 权重 | 如何衡量 |
|--------|--------|-------------|
| 准确性 | 35% | 每天将预测/声明与实际结果进行比较 |
| 正常运行时间 | 20% | 每 60 秒进行一次合成监控 |
| 新鲜度 | 15% | “实时”是否真正实时? |
| 延迟 | 15% | 多个地区的 P50/P95/P99 |
| 模式稳定性 | 5% | 检测破坏性更改 |
| 文档 | 5% | OpenAPI 规范、llms.txt、示例 |
| 信任信号 | 5% | 已发布的准确性数据、响应签名 |
## 评级 API(v1)
| API | 类别 | 评分 | 状态 |
|-----|----------|-------|--------|
| Curistat | 期货波动率 | -- | 监控中 |
| Alpha Vantage | 股票/宏观 | -- | 监控中 |
| Polygon.io | 市场数据 | -- | 监控中 |
| Finnhub | 多资产 | -- | 监控中 |
| Twelve Data | 市场数据 | -- | 监控中 |
| EODHD | 历史数据 | -- | 监控中 |
| Financial Modeling Prep | 基本面 | -- | 监控中 |
评分在 30 天的监控数据后生效。
## 机器可读的发现
- [`/llms.txt`](https://api.oathscore.dev/llms.txt) — 代理可读的产品描述
- [`/llms-full.txt`](https://api.oathscore.dev/llms-full.txt) — 完整的端点文档
- [`/.well-known/ai-plugin.json`](https://api.oathscore.dev/.well-known/ai-plugin.json) — ChatGPT 插件清单
- [`/openapi.json`](https://api.oathscore.dev/openapi.json) — OpenAPI 3.0.3 规范
- [`/docs`](https://api.oathscore.dev/docs) — 交互式 Swagger UI
## 定价
| 层级 | `/now` 调用 | 评分查询 | 价格 |
|------|-------------|---------------|-------|
| 免费 | 10/天 | 5/天 | $0 |
| 创始(前 50 名) | 5,000/天 | 2,500/天 | $9/月(终身) |
| 专业 | 10,000/天 | 5,000/天 | $29/月 |
| 企业 | 100,000/天 | 50,000/天 | $99/月 |
| 按需付费(x402) | 无限 | 无限 | $0.001-0.005/调用 |
**x402 微支付**:无需注册。代理使用 USDC 稳定币通过 [x402 协议](https://www.x402.org) 按需付费。当速率限制时,API 返回 `402 Payment Required`,并附有付款说明。
**API 审计**:独立的 7 天 API 质量审计 — $299-499。 [联系我们](mailto:hello@oathscore.dev)。
## 架构
```
[监控服务 - Railway $5/月]
每 60 秒:ping 所有评级 API(正常运行时间、延迟)
每 5 分钟:检查数据新鲜度
每小时:记录预测快照
每天:比较预测与实际结果(准确性)
存储:Supabase(免费层)
[/now 端点 - Cloudflare Workers $0/月]
每 60 秒:获取 VIX、计算交易所状态、读取事件
服务:缓存 JSON,最大年龄 = 30,ETag 支持
[评分引擎 - Cloudflare Workers $0/月]
每 5 分钟:从原始指标重新计算综合评分
服务:/score、/compare、/alerts 端点
```
## 集成示例
### CrewAI
```python
from crewai import Agent, Task
from crewai_tools import MCPTool
# 连接到 OathScore MCP
oathscore = MCPTool(server_command="python -m oathscore_mcp")
analyst = Agent(
role="市场分析师",
tools=[oathscore],
goal="在交易前评估当前市场状况"
)
task = Task(
description="检查市场是否开放并获取当前波动性制度",
agent=analyst
)
```
### LangChain
```python
from langchain_mcp import MCPToolkit
toolkit = MCPToolkit(server_command="python -m oathscore_mcp")
tools = toolkit.get_tools()
# 在任何 LangChain 代理中使用
from langchain.agents import initialize_agent
agent = initialize_agent(tools, llm, agent="zero-shot-react-description")
agent.run("当前的 VIX 水平是多少?美国市场是否开放?")
```
### 直接 HTTP(任何语言)
```python
import httpx
# 一次调用获取世界状态
now = httpx.get("https://api.oathscore.dev/now").json()
print(f"VIX: {now['volatility']['vix']}")
print(f"CME: {'开放' if now['exchanges']['CME']['is_open'] else '关闭'}")
print(f"下一个事件:{now['events']['next_event']}")
# 在承诺数据源之前检查 API 质量
score = httpx.get("https://api.oathscore.dev/score/polygon").json()
if score.get("composite_score", 0) < 70:
print("警告:数据源质量低于阈值")
```
### Claude Desktop / Claude Code
将以下内容添加到您的 MCP 配置(`~/.claude/mcp.json` 或 Claude Desktop 设置):
```json
{
"mcpServers": {
"oathscore": {
"command": "python",
"args": ["-m", "oathscore_mcp"]
}
}
}
```
然后询问 Claude: *"当前的市场状态如何?"* 或 *"Alpha Vantage 的可靠性如何?"*
---
如果这很有用,请给仓库点赞 — 它帮助其他人找到它。
## 许可证
专有。版权所有。