Memory

Prediction Market Arbitrage Api

Try it

Find arbitrage opportunities across Polymarket and Kalshi prediction markets via AIsa API. Scan sports markets for cross-platform price discrepancies, compar...

What it does

Find arbitrage opportunities across Polymarket and Kalshi via AIsa API.

The skill document

Prediction Market Arbitrage Api

Find arbitrage opportunities across Polymarket and Kalshi via AIsa API.

Setup

export AISA_API_KEY="your-key"

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

Workflow

Finding arbitrage involves these steps:

  1. Scan matching markets across platforms (scan for bulk, match for specific)
  2. Review spreads — the tool calculates price differences automatically
  3. Verify liquidity — use prediction_market_client.py orderbooks to check depth before acting

Quick Examples

Scan a sport for arbitrage

# Scan all NBA markets on a date — shows spreads automatically
python3 {baseDir}/scripts/arbitrage_finder.py scan nba --date 2025-04-01

Analyze a specific market

# By Polymarket slug
python3 {baseDir}/scripts/arbitrage_finder.py match --polymarket-slug 

# By Kalshi ticker
python3 {baseDir}/scripts/arbitrage_finder.py match --kalshi-ticker 

Verify liquidity before acting

# Check orderbook depth on both sides
python3 {baseDir}/scripts/prediction_market_client.py polymarket orderbooks --token-id 
python3 {baseDir}/scripts/prediction_market_client.py kalshi orderbooks --ticker 

Commands

arbitrage_finder.py — Automated Detection

python3 {baseDir}/scripts/arbitrage_finder.py scan  --date  [--min-spread ] [--min-liquidity ] [--json]
python3 {baseDir}/scripts/arbitrage_finder.py match --polymarket-slug  [--min-spread ] [--min-liquidity ] [--json]
python3 {baseDir}/scripts/arbitrage_finder.py match --kalshi-ticker  [--min-spread ] [--min-liquidity ] [--json]

Sports: nba, nfl, mlb, nhl, soccer, tennis.

prediction_market_client.py — Raw Market Data

Use for manual price checks and deeper analysis.

# Search markets
python3 {baseDir}/scripts/prediction_market_client.py polymarket markets --search  --status open --limit 5
python3 {baseDir}/scripts/prediction_market_client.py kalshi markets --search  --status open --limit 5

# Get prices (use token_id / market_ticker from markets output)
python3 {baseDir}/scripts/prediction_market_client.py polymarket price 
python3 {baseDir}/scripts/prediction_market_client.py kalshi price 

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

# Orderbook depth
python3 {baseDir}/scripts/prediction_market_client.py polymarket orderbooks --token-id 
python3 {baseDir}/scripts/prediction_market_client.py kalshi orderbooks --ticker 

Understanding Arbitrage

Arbitrage exists when the combined cost of all mutually exclusive outcomes across platforms is less than 1.0:

"Yes" at 0.40 on Polymarket + "No" at 0.55 on Kalshi = cost 0.95, guaranteed payout 1.00 → 5.3% profit.

Always verify orderbook depth — a spread without liquidity is not executable.

Security & Permissions

Requires: AISA_API_KEY environment variable.

All operations are read-only via HTTPS GET to api.aisa.one. Arbitrage spreads are calculated locally. 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

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván555 installs18 stars

Trade crypto, manage a multi-chain wallet, and query an AI analyst from one CLI.

by lowesyang162 installs109 stars

imagegen

Official

Generate or edit raster images (photos, illustrations, sprites, mockups) inside the current project workflow.

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