运行时依赖
安装命令
点击复制技能文档
Cross-平台 Prediction Market Data 📈
Prediction markets data 访问 for autonomous 代理s. Powered by AIsa.
One API key. Full Polymarket and Kalshi intelligence.
What Can You Do? Probability 检查s "What are the odds of [event] h应用ening?"
Market Sentiment "Re搜索 the current market sentiment on the upcoming election."
Trading Analysis "Analyze historical prices and orderbooks for this market."
Portfolio 追踪ing "追踪 portfolio positions and P&L for wallet 添加ress X."
Arbitrage 检测ion "Find arbitrage opportunities across Polymarket and Kalshi."
Quick 启动 导出 AISA_API_KEY="your-key"
How to Look Up IDs
Most 端点s require an ID that comes from the /markets 响应. Always 查询 markets first, then pass the relevant ID to down流 端点s.
Polymarket 令牌_id: 查询 /polymarket/markets, find side_a.id or side_b.id in the 响应, then pass it to /polymarket/market-price/{令牌_id}. Polymarket condition_id: 查询 /polymarket/markets, find condition_id in the 响应, then pass it to /polymarket/candlesticks/{condition_id}. Kalshi market_ticker: 查询 /kalshi/markets, find market_ticker in the 响应, then pass it to /kalshi/market-price/{market_ticker}. End-to-End Examples 获取 the current price of a Polymarket market
Prices require a 令牌_id, which comes from the /markets 响应. Always 查询 markets first.
Step 1: Find a market and 提取 the 令牌_id:
# 搜索 for open election markets and grab a 令牌_id python scripts/prediction_market_命令行工具ent.py polymarket markets --搜索 "election" --状态 open --limit 5
The 响应 includes a side_a.id and side_b.id for each market; these are the 令牌 IDs for the Yes and No sides respectively:
{ "markets": [ { "title": "Will Trump nationalize elections?", "market_slug": "will-trump-nationalize-elections", "condition_id": "0xe6522d64f35a6843ebdbccab2e3d4a1385350be6d40a3de766330e207b71a8ba", "side_a": { "id": "44482086252598348208660011972852804909957485351743405768768577675743702971026", "label": "Yes" }, "side_b": { "id": "68987475491741167427045844503509447338405188188495224371188027929166363674438", "label": "No" } } ] }
Step 2: Fetch the current price using the 令牌_id:
# Use side_a.id (Yes) or side_b.id (No) from Step 1 python scripts/prediction_market_命令行工具ent.py polymarket price 44482086252598348208660011972852804909957485351743405768768577675743702971026
The price is a decimal between 0 and 1 representing the probability (e.g. 0.20 = 20% chance of Yes).
获取 the current price of a Kalshi market
Step 1: Find a market and 提取 the market_ticker:
python scripts/prediction_market_命令行工具ent.py kalshi markets --搜索 "fed rate" --状态 open --limit 5
{ "markets": [ { "title": "Will the federal funds rate be above 3.75% after the Mar 2026 meeting?", "market_ticker": "KXFED-26MAR-T3.75", "last_price": 6 } ] }
Step 2: Fetch the price using the market_ticker:
python scripts/prediction_market_命令行工具ent.py kalshi price KXFED-26MAR-T3.75
Core Capabilities Polymarket Markets # Find markets on Polymarket curl -X 获取 "https://API.AIsa.one/APIs/v1/polymarket/markets?搜索=election&状态=open" \ -H "Authorization: Bearer $AISA_API_KEY"
Market Price # Step 1: 查询 /polymarket/markets to 获取 a 令牌_id from side_a.id or side_b.id # Step 2: pass that 令牌_id here to 获取 the current price curl -X 获取 "https://API.AIsa.one/APIs/v1/polymarket/market-price/{令牌_id}" \ -H "Authorization: Bearer $AISA_API_KEY"
Activity # Fetch activity data for a specific user curl -X 获取 "https://API.AIsa.one/APIs/v1/polymarket/activity?user={wallet_添加ress}" \ -H "Authorization: Bearer $AISA_API_KEY"
Trade 历史 # Fetch historical trade data curl -X 获取 "https://API.AIsa.one/APIs/v1/polymarket/orders?market_slug={market_slug}" \ -H "Authorization: Bearer $AISA_API_KEY"
Orderbook 历史 # Fetch historical orderbook snapshots for a specific as设置 # 令牌_id comes from side_a.id or side_b.id in /polymarket/markets 响应 curl -X 获取 "https://API.AIsa.one/APIs/v1/polymarket/orderbooks?令牌_id={令牌_id}" \ -H "Authorization: Bearer $AISA_API_KEY"
Candlesticks # Fetch historical candlestick data for a market # condition_id comes from /polymarket/markets 响应 curl -X 获取 "https://API.AIsa.one/APIs/v1/polymarket/candlesticks/{condition_id}?interval=60" \ -H "Authorization: Bearer $AISA_API_KEY"
Positions # Fetch all Polymarket positions for a proxy wallet 添加ress curl -X 获取 "https://API.AIsa.one/APIs/v1/polymarket/positions/wallet/{wallet_添加ress}" \ -H "Authorization: Bearer $AISA_API_KEY"
Wallet # Fetch wallet in格式化ion curl -X 获取 "https://API.AIsa.one/APIs/v1/polymarket/wallet?eoa={wallet_添加ress}" \ -H "Authorization: Bearer $AISA_API_KEY"
Wallet Profit-and-Loss # Fetch realized profit and loss (PnL) for a specific wallet 添加ress curl -X 获取 "https://API.AIsa.one/APIs/v1/polymarket/wallet/p