Documentation Index Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
Use this file to discover all available pages before exploring further.
View on GitHub ->
预测市场数据查询。 用 AIsa 访问 Polymarket 和 Kalshi 的市场、价格、订单簿与交易数据。
Install
aisa skills install prediction-market-data-zh
What can agents do with it?
Market lookup Find relevant prediction markets for a topic.
Price monitoring Read prices, order books, and market movement.
Wallet research Review positions and trade history.
Chinese reports Summarize market evidence in Chinese.
export AISA_API_KEY = "your-key"
在 aisa.one 获取 Key($0.01/次查询,按量付费)。
工作流程
查询预测市场数据的步骤:
搜索市场 获取 ID(必须从这一步开始)
从返回结果中提取 ID (token_id、condition_id 或 market_ticker)
用 ID 查询详情 (价格、订单簿、K线等)
快速示例
Polymarket:搜索 -> 获取价格
# 第一步:搜索市场,提取 token_id(side_a.id 或 side_b.id)
python3 scripts/prediction_market_client.py polymarket markets --search "election" --status open --limit 5
# 第二步:用第一步的 token_id 获取价格
python3 scripts/prediction_market_client.py polymarket price < token_i d >
Kalshi:搜索 -> 获取价格
# 第一步:搜索市场,提取 market_ticker
python3 scripts/prediction_market_client.py kalshi markets --search "fed rate" --status open --limit 5
# 第二步:用第一步的 market_ticker 获取价格
python3 scripts/prediction_market_client.py kalshi price < market_ticke r >
跨平台体育市场
python3 scripts/prediction_market_client.py sports by-date nba --date 2025-04-01
ID 参考
大多数命令需要从 markets 返回中获取 ID,务必先搜索。
平台 ID 字段 获取位置 Polymarket token_idmarkets 输出中的 side_a.id 或 side_b.id Polymarket condition_idmarkets 输出中的 condition_id Kalshi market_tickermarkets 输出中的 market_ticker
命令参考
Polymarket
python3 scripts/prediction_market_client.py polymarket markets [--search < 关键 词 > ] [--status open | closed] [--min-volume < 数 值 > ] [--limit < 数 值 > ]
python3 scripts/prediction_market_client.py polymarket price < token_i d > [--at-time < unix时间 戳 > ]
python3 scripts/prediction_market_client.py polymarket activity --user < 钱包地 址 > [--market-slug < slu g > ] [--limit < 数 值 > ]
python3 scripts/prediction_market_client.py polymarket orders [--market-slug < slu g > ] [--token-id < i d > ] [--user < 钱包地 址 > ] [--limit < 数 值 > ]
python3 scripts/prediction_market_client.py polymarket orderbooks --token-id < i d > [--start < 毫 秒 > ] [--end < 毫 秒 > ] [--limit < 数 值 > ]
python3 scripts/prediction_market_client.py polymarket candlesticks < condition_i d > --start < unix时间 戳 > --end < unix时间 戳 > [--interval 1 | 60 | 1440]
python3 scripts/prediction_market_client.py polymarket positions < 钱包地 址 > [--limit < 数 值 > ]
python3 scripts/prediction_market_client.py polymarket wallet (--eoa < 地 址 > | --proxy < 地 址 > ) [--with-metrics]
python3 scripts/prediction_market_client.py polymarket pnl < 钱包地 址 > --granularity < day | week | month >
Kalshi
python3 scripts/prediction_market_client.py kalshi markets [--search < 关键 词 > ] [--status open | closed] [--min-volume < 数 值 > ] [--limit < 数 值 > ]
python3 scripts/prediction_market_client.py kalshi price < market_ticke r > [--at-time < unix时间 戳 > ]
python3 scripts/prediction_market_client.py kalshi trades [--ticker < ticke r > ] [--start < unix时间 戳 > ] [--end < unix时间 戳 > ] [--limit < 数 值 > ]
python3 scripts/prediction_market_client.py kalshi orderbooks --ticker < ticke r > [--start < 毫 秒 > ] [--end < 毫 秒 > ] [--limit < 数 值 > ]
跨平台体育市场
python3 scripts/prediction_market_client.py sports matching (--polymarket-slug < slu g > | --kalshi-ticker < ticke r > )
python3 scripts/prediction_market_client.py sports by-date < 运动类 型 > --date < YYYY-MM-D D >
支持:nfl、mlb、cfb、nba、nhl、cbb、pga、tennis。
理解赔率
价格为小数:0.65 = 65% 隐含概率。“Yes” 价格 = 事件发生的概率。交易量越高 = 流动性越强。
安全与权限
需要: AISA_API_KEY 环境变量。
所有操作均为只读 ,通过 HTTPS GET 请求 api.aisa.one。不执行交易、不连接钱包、除 API Key 外不发送个人数据。每个响应包含 usage.cost 和 usage.credits_remaining。
完整文档:AIsa API 参考 。
Get started
Sign up at aisa.one (new accounts start with $2 free credit).
Generate an API key from the console.
Set your key and install the skill:
export AISA_API_KEY = "your-key"
aisa skills install prediction-market-data-zh
Start a new agent session so the runtime loads the updated skill instructions.
Prediction Market Data English-language prediction market data skill.
Prediction Market Arbitrage ZH Chinese-language arbitrage workflows.
Prediction Market API Polymarket and Kalshi endpoint docs.