Signal Market API

获取实时事件检测、预测概率、用户透镜简报等功能。构建您自己的金融事件监控系统。

认证方式

部分端点需要 API Key 认证,在请求头中传递:

x-api-key: your_api_key_here

系统端点

GET /signals/health

健康检查

检查系统健康状态和各层数据输出

在线试用

事件端点

GET /events

获取事件列表

获取当前事件列表,支持分页、过滤和排序

查询参数

参数 类型 默认值 描述
limit integer 20 返回数量限制 (1-100)
offset integer 0 偏移量
stage string - 按阶段过滤 (emerging, accelerating, peak, fading)
topic string - 按主题过滤
sortBy string timestamp 排序字段 (timestamp, probability, title)
sortOrder string desc 排序方向 (asc, desc)

在线试用

GET /events/{event_id}/probability

获取事件概率详情

获取特定事件的概率数据

在线试用

用户透镜端点

GET /lenses/{lens_id}/daily-brief

获取用户透镜简报

获取指定透镜的每日简报

在线试用

证据端点

GET /evidence/{event_id}

获取事件证据

获取与事件相关的证据列表

在线试用

预测市场端点

GET /predictions

获取预测市场列表

获取预测市场事件列表,支持分页和过滤

在线试用

GET /predictions/{event_id}

获取预测概率曲线

获取特定预测事件的历史概率曲线

在线试用

监控端点

POST /watch

创建事件监控

创建新的事件监控任务

请求体

{ "event_ids": ["evt_001", "evt_002"], "notify_email": "user@example.com" }

在线试用

错误响应

所有错误响应遵循以下格式:

{ "error": "Error message description", "code": "ERROR_CODE", "timestamp": "2024-01-15T08:30:00.000Z" }

使用示例

cURL

# 健康检查 curl http://localhost:3000/signals/health # 获取事件 (分页) curl "http://localhost:3000/events?limit=10&offset=0" # 按阶段过滤 curl "http://localhost:3000/events?stage=accelerating,peak" # 排序 curl "http://localhost:3000/events?sortBy=probability&sortOrder=desc"

JavaScript

const API_URL = 'http://localhost:3000'; async function getEvents(options = {}) { const params = new URLSearchParams(options); const res = await fetch(`${API_URL}/events?${params}`); return res.json(); } // 使用 const data = await getEvents({ limit: 10, stage: 'accelerating', sortBy: 'probability', sortOrder: 'desc' }); console.log(data);