prediction-markets
Polymarket、Manifoldなどの予測市場データを取得し、確率ダッシュボード構築、市場流動性分析、自動取引ボット作成、イベント確率可視化、予測精度追跡など、市場分析とAPI連携を支援するSkill。
📜 元の英語説明(参考)
Build tools and dashboards for prediction markets — Polymarket, Manifold, Kalshi, and Metaculus. Use when tasks involve fetching prediction market data, building probability dashboards, analyzing market liquidity, creating trading bots for prediction markets, visualizing event probabilities, or tracking forecasting accuracy. Covers both API integration and market analysis.
🇯🇵 日本人クリエイター向け解説
Polymarket、Manifoldなどの予測市場データを取得し、確率ダッシュボード構築、市場流動性分析、自動取引ボット作成、イベント確率可視化、予測精度追跡など、市場分析とAPI連携を支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o prediction-markets.zip https://jpskill.com/download/15282.zip && unzip -o prediction-markets.zip && rm prediction-markets.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/15282.zip -OutFile "$d\prediction-markets.zip"; Expand-Archive "$d\prediction-markets.zip" -DestinationPath $d -Force; ri "$d\prediction-markets.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
prediction-markets.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
prediction-marketsフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
予測市場
概要
予測市場プラットフォーム向けのツールを構築します。データの取得、市場の分析、ダッシュボードの作成、取引戦略の実装を行います。Polymarket、Kalshi、Manifold、Metaculus の API を扱います。
手順
プラットフォームの概要
Platform | Type | Markets | API | Trading
-------------|-------------------|------------------|-----------|--------
Polymarket | Crypto (Polygon) | Binary/Multi | REST+WS | CLOB
Kalshi | Regulated (US) | Binary events | REST+WS | CLOB
Manifold | Play money + Mana | Any question | REST | AMM
Metaculus | Forecasting | Probability est. | REST | No trading
Polymarket API
Polymarket は、出来高が最大です。データは認証なしで公開されています。
# polymarket_client.py
import requests
GAMMA_API = "https://gamma-api.polymarket.com"
CLOB_API = "https://clob.polymarket.com"
def get_active_markets(limit: int = 100, offset: int = 0) -> list:
"""Fetch active markets sorted by 24h volume."""
resp = requests.get(f"{GAMMA_API}/events", params={
"limit": limit, "offset": offset,
"active": True, "closed": False,
"order": "volume24hr", "ascending": False
})
return resp.json()
def get_market_prices(condition_id: str) -> dict:
"""Get current prices (probabilities) for a market's outcomes."""
return requests.get(f"{CLOB_API}/prices",
params={"token_ids": condition_id}).json()
def get_market_history(condition_id: str, interval: str = "1d") -> list:
"""Fetch price history for a market."""
resp = requests.get(f"{CLOB_API}/prices-history", params={
"market": condition_id, "interval": interval, "fidelity": 60
})
return resp.json().get("history", [])
市場分析
# market_analyzer.py
def find_arbitrage_opportunities(markets: list, threshold: float = 0.02) -> list:
"""Find markets where outcome probabilities don't sum to ~1.0."""
opportunities = []
for market in markets:
outcomes = market.get('outcomes', [])
if len(outcomes) == 2:
total = sum(float(o.get('price', 0)) for o in outcomes)
if abs(total - 1.0) > threshold:
opportunities.append({
'title': market['title'],
'deviation': abs(total - 1.0),
'volume_24h': market.get('volume24hr', 0)
})
return sorted(opportunities, key=lambda x: x['deviation'], reverse=True)
def calculate_expected_value(probability: float, buy_price: float,
fees: float = 0.02) -> float:
"""Calculate EV of a prediction market position."""
cost = buy_price * (1 + fees)
return probability * (1.0 - cost) - (1 - probability) * cost
Kalshi API
Kalshi は CFTC の規制を受けています (米国からアクセス可能)。認証が必要です。
# kalshi_client.py
KALSHI_API = "https://trading-api.kalshi.com/trade-api/v2"
class KalshiClient:
def __init__(self, email: str, password: str):
self.session = requests.Session()
resp = self.session.post(f"{KALSHI_API}/login",
json={"email": email, "password": password})
self.session.headers["Authorization"] = f"Bearer {resp.json()['token']}"
def get_events(self, status: str = "open", limit: int = 100) -> list:
return self.session.get(f"{KALSHI_API}/events",
params={"status": status, "limit": limit}).json().get("events", [])
def get_orderbook(self, ticker: str) -> dict:
return self.session.get(f"{KALSHI_API}/orderbook",
params={"ticker": ticker}).json()
def place_order(self, ticker: str, side: str, count: int, price: int) -> dict:
return self.session.post(f"{KALSHI_API}/portfolio/orders", json={
"ticker": ticker, "side": side, "count": count, "type": "limit",
"yes_price": price if side == "yes" else None,
"no_price": price if side == "no" else None
}).json()
Manifold Markets API
プレイマネーです。実験に最適で、読み取りには認証は不要です。
MANIFOLD_API = "https://api.manifold.markets/v0"
def search_markets(query: str, limit: int = 20) -> list:
return requests.get(f"{MANIFOLD_API}/search-markets",
params={"term": query, "limit": limit, "sort": "liquidity"}).json()
ダッシュボードの構築
予測市場ダッシュボードの主要な視覚化:
- マーケットカード: タイトル、確率 (色分け)、24 時間出来高、解決までの時間
- 確率タイムライン: 時間経過に伴う勢いを示す折れ線グラフ
- 出来高バー: 市場の注目度を示す 24 時間出来高履歴
- アラート: 24 時間で確率が 10% 以上変動した市場
# market_scorer.py — ダッシュボードでの重要度に応じて市場をスコアリング
def score_market(market: dict) -> float:
score = 0.0
volume = market.get('volume24hr', 0)
prob = market.get('probability', 0.5)
if volume > 100000: score += 30
elif volume > 10000: score += 20
elif volume > 1000: score += 10
uncertainty = 1 - abs(prob - 0.5) * 2 # 50% で 1.0、極端な値で 0.0
score += uncertainty * 25
prob_change = abs(market.get('probability_change_24h', 0))
if prob_change > 0.10: score += 20
elif prob_change > 0.05: score += 10
return min(score, 100)
例
予測市場ダッシュボードの構築
24 時間出来高でソートされた上位 50 件の Polymarket イベントを表示するリアルタイムダッシュボードを構築します。各市場を、タイトル、現在の確率 (赤-緑で色分け)、出来高、解決までの時間、および 7 日間の確率チャートを含むカードとして表示します。カテゴリ (政治、暗号通貨、スポーツ、テクノロジー) でグループ化します。過去 24 時間で確率が 10% 以上変動した市場のアラートを追加します。React と Chart.js を使用します。
誤った価格設定の予測市場を見つける
すべてのアクティブな市場を分析します
(原文がここで切り詰められています) 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Prediction Markets
Overview
Build tools for prediction market platforms — fetch data, analyze markets, create dashboards, and implement trading strategies. Cover Polymarket, Kalshi, Manifold, and Metaculus APIs.
Instructions
Platform overview
Platform | Type | Markets | API | Trading
-------------|-------------------|------------------|-----------|--------
Polymarket | Crypto (Polygon) | Binary/Multi | REST+WS | CLOB
Kalshi | Regulated (US) | Binary events | REST+WS | CLOB
Manifold | Play money + Mana | Any question | REST | AMM
Metaculus | Forecasting | Probability est. | REST | No trading
Polymarket API
Polymarket is the largest by volume. Data is publicly accessible without authentication.
# polymarket_client.py
import requests
GAMMA_API = "https://gamma-api.polymarket.com"
CLOB_API = "https://clob.polymarket.com"
def get_active_markets(limit: int = 100, offset: int = 0) -> list:
"""Fetch active markets sorted by 24h volume."""
resp = requests.get(f"{GAMMA_API}/events", params={
"limit": limit, "offset": offset,
"active": True, "closed": False,
"order": "volume24hr", "ascending": False
})
return resp.json()
def get_market_prices(condition_id: str) -> dict:
"""Get current prices (probabilities) for a market's outcomes."""
return requests.get(f"{CLOB_API}/prices",
params={"token_ids": condition_id}).json()
def get_market_history(condition_id: str, interval: str = "1d") -> list:
"""Fetch price history for a market."""
resp = requests.get(f"{CLOB_API}/prices-history", params={
"market": condition_id, "interval": interval, "fidelity": 60
})
return resp.json().get("history", [])
Market analysis
# market_analyzer.py
def find_arbitrage_opportunities(markets: list, threshold: float = 0.02) -> list:
"""Find markets where outcome probabilities don't sum to ~1.0."""
opportunities = []
for market in markets:
outcomes = market.get('outcomes', [])
if len(outcomes) == 2:
total = sum(float(o.get('price', 0)) for o in outcomes)
if abs(total - 1.0) > threshold:
opportunities.append({
'title': market['title'],
'deviation': abs(total - 1.0),
'volume_24h': market.get('volume24hr', 0)
})
return sorted(opportunities, key=lambda x: x['deviation'], reverse=True)
def calculate_expected_value(probability: float, buy_price: float,
fees: float = 0.02) -> float:
"""Calculate EV of a prediction market position."""
cost = buy_price * (1 + fees)
return probability * (1.0 - cost) - (1 - probability) * cost
Kalshi API
Kalshi is CFTC-regulated (US-accessible). Requires authentication:
# kalshi_client.py
KALSHI_API = "https://trading-api.kalshi.com/trade-api/v2"
class KalshiClient:
def __init__(self, email: str, password: str):
self.session = requests.Session()
resp = self.session.post(f"{KALSHI_API}/login",
json={"email": email, "password": password})
self.session.headers["Authorization"] = f"Bearer {resp.json()['token']}"
def get_events(self, status: str = "open", limit: int = 100) -> list:
return self.session.get(f"{KALSHI_API}/events",
params={"status": status, "limit": limit}).json().get("events", [])
def get_orderbook(self, ticker: str) -> dict:
return self.session.get(f"{KALSHI_API}/orderbook",
params={"ticker": ticker}).json()
def place_order(self, ticker: str, side: str, count: int, price: int) -> dict:
return self.session.post(f"{KALSHI_API}/portfolio/orders", json={
"ticker": ticker, "side": side, "count": count, "type": "limit",
"yes_price": price if side == "yes" else None,
"no_price": price if side == "no" else None
}).json()
Manifold Markets API
Play money — great for experimenting, no auth required for reading:
MANIFOLD_API = "https://api.manifold.markets/v0"
def search_markets(query: str, limit: int = 20) -> list:
return requests.get(f"{MANIFOLD_API}/search-markets",
params={"term": query, "limit": limit, "sort": "liquidity"}).json()
Dashboard building
Key visualizations for a prediction market dashboard:
- Market cards: Title, probability (color-coded), 24h volume, time to resolution
- Probability timeline: Line chart showing momentum over time
- Volume bars: 24h volume history showing market attention
- Alerts: Markets where probability moved >10% in 24 hours
# market_scorer.py — Score markets for dashboard prominence
def score_market(market: dict) -> float:
score = 0.0
volume = market.get('volume24hr', 0)
prob = market.get('probability', 0.5)
if volume > 100000: score += 30
elif volume > 10000: score += 20
elif volume > 1000: score += 10
uncertainty = 1 - abs(prob - 0.5) * 2 # 1.0 at 50%, 0.0 at extremes
score += uncertainty * 25
prob_change = abs(market.get('probability_change_24h', 0))
if prob_change > 0.10: score += 20
elif prob_change > 0.05: score += 10
return min(score, 100)
Examples
Build a prediction market dashboard
Build a real-time dashboard showing the top 50 Polymarket events sorted by 24-hour volume. Show each market as a card with: title, current probability (color-coded red-green), volume, time to resolution, and 7-day probability chart. Group by category (politics, crypto, sports, tech). Add alerts for markets where probability moved more than 10% in the last 24 hours. Use React and Chart.js.
Find mispriced prediction markets
Analyze all active Polymarket binary markets. Find markets where the Yes + No prices deviate more than 3% from $1.00 (indicating potential mispricing). Also find markets where the probability has been stable for weeks but a relevant news event just occurred. Output a ranked list of opportunities with expected value calculations.
Build a forecasting accuracy tracker
Build a system that tracks my prediction market bets across Polymarket and Kalshi, calculates my Brier score over time, and shows a calibration chart (predicted probabilities vs actual outcomes). Include position-size-weighted returns and compare my accuracy against the market's consensus probabilities.
Guidelines
- Always check market liquidity (24h volume) before placing trades — low-liquidity markets have wide spreads
- In binary markets, verify Yes + No prices sum to ~$1.00; deviations indicate mispricing or fees
- Use Manifold (play money) for strategy testing before deploying capital on Polymarket or Kalshi
- Compare your forecasts against market consensus to measure calibration over time
- Monitor for >10% probability swings in 24 hours — these often signal new information or mispricing
- Be aware that Polymarket is crypto-based (Polygon) while Kalshi is CFTC-regulated with different rules
- Calculate expected value before every trade; don't trade based on conviction alone