通过后端 API,使用文本或 X (Twitter) 链接搜索 Prediction Bridge 预测市场事件。
当用户想要为以下对象找到相关的预测市场/活动时使用此技能:. a 短文本查询(主题,问题,标题). a URL 到文章的1.an X (Twitter) 状态链是一项面向实际任务的技能。它将相关步骤、工具调用和结果整理方式集中到统一流程中,帮助使用者更快完成目标并减少重复操作。
实际使用前应先确认任务范围、数据来源、运行环境、必要权限和关键参数,再依据技能说明逐步执行;若输入条件不完整,应先补齐信息或采用保守配置,避免因错误假设导致结果偏离需求。
执行过程中需要关注工具调用是否成功、接口或依赖是否可用、输出格式是否符合预期,并对异常提示、缺失字段和边界情况进行处理;涉及批量任务时,还应保存进度,避免中断后重复操作。
当用户希望查找与以下内容相关的预测市场/事件时,请使用此技能:
当用户提出以下请求时,请使用此技能:
本技能最适合用于:
以下情况不建议使用本技能:
本技能调用现有的 Prediction Bridge 后端接口:
POST /api/v1/search/unified返回匹配的 events(预测市场事件),并可选返回匹配的 news。
API 基地址(默认为生产环境):
PREDICTION_BRIDGE_API_URL默认值:
https://prediction-bridge.onrender.com/api/v1http://localhost:8000/api/v1text 字段传入;后端将负责解析。使用 exec 执行 curl 命令:
API_URL="${PREDICTION_BRIDGE_API_URL:-https://prediction-bridge.onrender.com/api/v1}"
curl -sS -X POST "$API_URL/search/unified"
-H "Content-Type: application/json"
-H "X-Request-ID: pb-$(date +%s)"
--data-binary @- <<'JSON'
{
"text": "",
"limit": 10,
"offset": 0,
"include_inactive": false,
"include_markets": true,
"markets_per_event": 1,
"include_translations": false
}
JSON
说明:
markets_per_event: 1 可保持响应体体积较小,同时仍展示主市场。markets_per_event 的值。POST /search/unified 返回如下结构的 JSON(部分字段可能因数据不可用而缺失或为 null):
{
"source": {
"type": "x" ,
"url": "https://x.com/.../status/...",
"text": "resolved tweet text (optional)",
"id": "optional"
},
"events": [
{
"score": 0.82,
"event": {
"id": 123,
"title": "...",
"description": "...",
"source": "polymarket",
"source_url": "https://polymarket.com/event/...",
"status": "active",
"volume_usd": 12345.67,
"liquidity_usd": 2345.0,
"end_date": "2026-12-31T00:00:00Z",
"markets": [
{
"id": 999,
"question": "...",
"outcomes": ["Yes", "No"],
"outcome_prices": {"Yes": 0.61, "No": 0.39},
"volume": 1000.0,
"active": true,
"closed": false
}
]
}
}
],
"news": [
{
"score": 0.74,
"news": {
"id": 456,
"title": "...",
"summary": "...",
"url": "https://...",
"image_url": "https://...",
"source": "...",
"published_at": "2026-02-01T12:34:56Z"
}
}
]
}
关键要点:
events[] 是主要输出。每项结构为 { score, event }。score 表示相关性得分,数值越高表示匹配度越好。event.markets 字段仅在请求中设置 include_markets: true 时存在。markets_per_event,后端可能只返回预览子集。news[] 是可选的辅助上下文信息,请勿让其干扰或淹没事件结果。重要提示:
events 列表。events 字段缺失或非数组类型,则视为空列表。score 降序排列 events(即使后端已排序)。event.source_url 作为点击跳转链接。event.source_url 缺失,则回退至前端详情页:https://www.predictionbridge.xyz/event/event.markets[0].outcome_prices 存在:outcome_prices.Yes 或 outcome_prices.Long)event.source)event.source_url)news 存在,最多附加 1–3 条,仅含标题 + URL,作为补充上下文。events 为空:收到 JSON 后:
events 为空,则说明未找到匹配项,并提示用户提供更具体的查询。event.source_url)event.markets 中首个市场,若有)若 news 存在,可选择性地展示 1–3 条相关新闻作为上下文。
PREDICTION_BRIDGE_API_URL 设置是否正确,以及 API 是否可达。相关专题
热门下载
相关下载
精品课程
共6课时 | 54.7万人学习
共89课时 | 133.9万人学习
共49课时 | 82.5万人学习