Data & analysis

Prediction Market Data

Try it

Cross-platform prediction market data via AIsa API. Query Polymarket and Kalshi markets, prices, orderbooks, candlesticks, positions, and trades. Use when us...

What it does

Query Polymarket and Kalshi prediction markets via AIsa API.

The skill document

Prediction Market Data

Query Polymarket and Kalshi prediction markets via AIsa API.

Setup

export AISA_API_KEY="your-key"

Get a key at aisa.one ($0.01/query, pay-as-you-go).

Workflow

Querying prediction market data involves these steps:

  1. Search markets to find IDs (always start here)
  2. Extract the ID from the response (token_id, condition_id, or market_ticker)
  3. Query details using the extracted ID (price, orderbook, candlesticks, etc.)

Quick Examples

Polymarket: search → get price

# Step 1: Search — find markets and extract token_id (side_a.id or side_b.id)
python3 {baseDir}/scripts/prediction_market_client.py polymarket markets --search "election" --status open --limit 5

# Step 2: Get price using token_id from Step 1
python3 {baseDir}/scripts/prediction_market_client.py polymarket price 

Kalshi: search → get price

# Step 1: Search — find markets and extract market_ticker
python3 {baseDir}/scripts/prediction_market_client.py kalshi markets --search "fed rate" --status open --limit 5

# Step 2: Get price using market_ticker from Step 1
python3 {baseDir}/scripts/prediction_market_client.py kalshi price 

Cross-platform sports

python3 {baseDir}/scripts/prediction_market_client.py sports by-date nba --date 2025-04-01

ID Reference

Most commands need an ID from the markets response. Always search first.

PlatformID FieldWhere to Find
Polymarkettoken_idside_a.id or side_b.id in markets output
Polymarketcondition_idcondition_id in markets output
Kalshimarket_tickermarket_ticker in markets output

Commands

Polymarket

python3 {baseDir}/scripts/prediction_market_client.py polymarket markets [--search ] [--status open|closed] [--min-volume ] [--limit ]
python3 {baseDir}/scripts/prediction_market_client.py polymarket price  [--at-time ]
python3 {baseDir}/scripts/prediction_market_client.py polymarket activity --user  [--market-slug ] [--limit ]
python3 {baseDir}/scripts/prediction_market_client.py polymarket orders [--market-slug ] [--token-id ] [--user ] [--limit ]
python3 {baseDir}/scripts/prediction_market_client.py polymarket orderbooks --token-id  [--start ] [--end ] [--limit ]
python3 {baseDir}/scripts/prediction_market_client.py polymarket candlesticks  --start  --end  [--interval 1|60|1440]
python3 {baseDir}/scripts/prediction_market_client.py polymarket positions  [--limit ]
python3 {baseDir}/scripts/prediction_market_client.py polymarket wallet (--eoa  | --proxy ) [--with-metrics]
python3 {baseDir}/scripts/prediction_market_client.py polymarket pnl  --granularity 

Kalshi

python3 {baseDir}/scripts/prediction_market_client.py kalshi markets [--search ] [--status open|closed] [--min-volume ] [--limit ]
python3 {baseDir}/scripts/prediction_market_client.py kalshi price  [--at-time ]
python3 {baseDir}/scripts/prediction_market_client.py kalshi trades [--ticker ] [--start ] [--end ] [--limit ]
python3 {baseDir}/scripts/prediction_market_client.py kalshi orderbooks --ticker  [--start ] [--end ] [--limit ]

Cross-Platform Sports

python3 {baseDir}/scripts/prediction_market_client.py sports matching (--polymarket-slug  | --kalshi-ticker )
python3 {baseDir}/scripts/prediction_market_client.py sports by-date  --date 

Sports: nfl, mlb, cfb, nba, nhl, cbb, pga, tennis.

Understanding Odds

Prices are decimals: 0.65 = 65% implied probability. "Yes" price = probability the event happens. Higher volume = more liquidity.

Security & Permissions

Requires: AISA_API_KEY environment variable.

All operations are read-only via HTTPS GET to api.aisa.one. No trades executed, no wallets connected, no personal data sent beyond the API key. Every response includes usage.cost and usage.credits_remaining.

Full docs: AIsa API Reference.

Related skills

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants4.3k installs296 stars

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Query Twitter/X profiles, tweets, follower events, and KOL data through the 6551 REST API.

by infra403840 installs27 stars

Build a git-derived ownership map of people-to-files with bus-factor and sensitive-code risk exports for Neo4j/Gephi.

by OpenAI27.5k stars

Scaffold a Codex plugin directory with the required `.codex-plugin/plugin.json` and a marketplace entry.

by OpenAI27.5k stars

Deploy web projects to Netlify using the Netlify CLI (`npx netlify`). Use when the user asks to deploy, host, publish, or link a site/repo on Netlify, including preview and production deploys.

by OpenAI27.5k stars

More from bibaofeng

Browse all skills

Get a 30-day, multi-source research brief on any topic, ranked and clustered with citations.

by bibaofeng19 installs

Query real-time and historical financial data across equities and crypto—prices, market moves, metrics, and trends for analysis, alerts, and reporting. Use w...

by bibaofeng34 installs

Multi-source search engine powered by AIsa API. Combines Tavily web search, Scholar academic search, Smart hybrid search, and Perplexity deep research — all...

by bibaofeng19 installs

Reads and searches X (Twitter) data including profiles, timelines, mentions, followers, tweet search, trends, lists, communities, and Spaces. Also supports p...

by bibaofeng13 installs

Unified SaaS integration gateway via api.aisa.one (AISA gateway, v3.1): manage OAuth auth for third-party SaaS apps (Gmail/Slack/GitHub/Notion etc.), tool ex...

by bibaofeng12 installs

Generate images and videos with AIsa. Supports four image models (Google Gemini 3 Pro Image, Alibaba Wan 2.7 image + image-pro, ByteDance Seedream) and four...

by bibaofeng12 installs