Find and analyze arbitrage opportunities across prediction markets like Polymarket and Kalshi

v1.0.0

Find and analyze arbitrage opportunities across prediction markets like Polymarket and Kalshi.

0· 97·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for chaimengphp/openclaw-aisa-prediction-market-arbitrage.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Find and analyze arbitrage opportunities across prediction markets like Polymarket and Kalshi" (chaimengphp/openclaw-aisa-prediction-market-arbitrage) from ClawHub.
Skill page: https://clawhub.ai/chaimengphp/openclaw-aisa-prediction-market-arbitrage
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: AISA_API_KEY
Required binaries: curl, python3
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install openclaw-aisa-prediction-market-arbitrage

ClawHub CLI

Package manager switcher

npx clawhub@latest install openclaw-aisa-prediction-market-arbitrage
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (cross-platform arbitrage) match the included Python clients and curl examples which query a single aggregator (https://api.aisa.one). Requested binaries (curl, python3) and the AISA_API_KEY are appropriate and proportional.
Instruction Scope
SKILL.md and the scripts instruct only to call AIsa endpoints (GET requests) to fetch markets, prices, and orderbooks. The instructions require replacing placeholders before execution and do not direct the agent to read unrelated files or other environment variables.
Install Mechanism
No install spec — instruction-only skill with bundled Python scripts. No external downloads or archive extraction are performed by an installer, so there's no elevated install risk.
Credentials
Only one required env var (AISA_API_KEY) is declared and used. That key is needed to authenticate to the AIsa API; no unrelated secrets or credentials are requested.
Persistence & Privilege
always:false (default), skill is user-invocable and may be called autonomously by the agent (platform default). The skill does not request permanent presence or modify other skills/configs.
Assessment
This skill is coherent: it queries the AIsa aggregator (api.aisa.one) for Polymarket/Kalshi data and requires a single AISA_API_KEY. Before installing, confirm you trust the AIsa service and the skill author because the key will be used to make network requests and may incur API usage/costs. The provided scripts and SKILL.md perform read-only GET requests; they will not execute arbitrary installers or request other secrets. Avoid supplying other private credentials or wallet keys to the skill; if you run the included scripts locally, review them first and only pass wallet addresses you are comfortable exposing (these endpoints return portfolio/position data if queried).

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

⚖️ Clawdis
Binscurl, python3
EnvAISA_API_KEY
Primary envAISA_API_KEY
latestvk975ynf5br2q3zzety24f073p58432d2
97downloads
0stars
1versions
Updated 3w ago
v1.0.0
MIT-0

Cross-Platform Prediction Market Arbitrage ⚖️

Find arbitrage opportunities across prediction markets for autonomous agents. Powered by AIsa.

One API key. Match events across Polymarket and Kalshi to detect price discrepancies and potential risk-free profit opportunities.

What Can You Do?

Detect Price Discrepancies

"Find the current price difference for the US election market between Polymarket and Kalshi."

Match Cross-Platform Markets

"Find the Kalshi equivalent for this Polymarket sports event."

Track Arbitrage Spreads

"Monitor the price spread for the upcoming NBA game across all supported prediction markets."

Analyze Orderbook Depth

"Check the orderbook depth on both platforms to see if the arbitrage opportunity is actionable."

Quick Start

export AISA_API_KEY="your-key"

How to Look Up IDs

Most endpoints require an ID from the /markets or /matching-markets responses. Always query markets first, then pass the relevant ID to downstream endpoints.

  1. Polymarket token_id: Query /polymarket/markets, find side_a.id or side_b.id in the response, then use that value in the market price and orderbook endpoints.
  2. Kalshi market_ticker: Query /kalshi/markets, find market_ticker in the response, then use that value in the market price and orderbook endpoints.

Core Capabilities

1. Find Matching Markets

The first step in arbitrage is finding the same event on multiple platforms.

Match by Event Ticker or Slug

# Find equivalent markets across platforms using a Polymarket slug
curl -X GET "https://api.aisa.one/apis/v1/matching-markets/sports?polymarket_market_slug={polymarket_market_slug}" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Or find equivalent markets using a Kalshi event ticker
curl -X GET "https://api.aisa.one/apis/v1/matching-markets/sports?kalshi_event_ticker={kalshi_event_ticker}" \
  -H "Authorization: Bearer $AISA_API_KEY"

Match Sports by Date

# Find all matching sports markets across platforms for a specific date
curl -X GET "https://api.aisa.one/apis/v1/matching-markets/sports/{sport}?date={date}" \
  -H "Authorization: Bearer $AISA_API_KEY"

2. Compare Prices

Once matching markets are found, fetch the current prices on both platforms to calculate the spread.

Get Polymarket Price

# token_id comes from side_a.id or side_b.id in /polymarket/markets response
curl -X GET "https://api.aisa.one/apis/v1/polymarket/market-price/{token_id}" \
  -H "Authorization: Bearer $AISA_API_KEY"

Get Kalshi Price

# market_ticker comes from /kalshi/markets response
curl -X GET "https://api.aisa.one/apis/v1/kalshi/market-price/{market_ticker}" \
  -H "Authorization: Bearer $AISA_API_KEY"

3. Verify Liquidity

A price discrepancy is only actionable if there is enough liquidity to execute the trades.

Polymarket Orderbook

# token_id comes from side_a.id or side_b.id in /polymarket/markets response
curl -X GET "https://api.aisa.one/apis/v1/polymarket/orderbooks?token_id={token_id}" \
  -H "Authorization: Bearer $AISA_API_KEY"

Kalshi Orderbook

# ticker is the same value as market_ticker from /kalshi/markets response
curl -X GET "https://api.aisa.one/apis/v1/kalshi/orderbooks?ticker={ticker}" \
  -H "Authorization: Bearer $AISA_API_KEY"

API Endpoints Reference

Cross-Platform Endpoints

EndpointDescriptionKey Params
/matching-markets/sportsFind matching sports marketspolymarket_market_slug or kalshi_event_ticker
/matching-markets/sports/<sport>Find sports markets by datesport, date

Price and Liquidity Endpoints

EndpointDescriptionKey Params
/polymarket/market-price/<token_id>Get Polymarket pricetoken_id, at_time
/kalshi/market-price/<market_ticker>Get Kalshi pricemarket_ticker, at_time
/polymarket/orderbooksGet Polymarket orderbooktoken_id, start_time, end_time
/kalshi/orderbooksGet Kalshi orderbookticker, start_time, end_time

Important Note About cURL Placeholders

The {...} values in the cURL examples are product-level placeholders and must be replaced before execution.

Execution constraint:

  • Before running curl, the agent or runner must verify that every {...} placeholder has been replaced with a concrete value.
  • If any placeholder such as {token_id}, {market_ticker}, {sport}, or {date} is still present in the final command, do not execute the command. Fail fast and surface a missing-parameter error instead.

This constraint is required because a literal brace placeholder may be interpreted by curl as URL globbing syntax rather than as plain text.

Understanding Arbitrage and Odds

  • Prices as probabilities: Prices are usually shown as decimals, for example 0.65 means a 65% implied probability.
  • Arbitrage opportunity: An opportunity exists when the combined price of all mutually exclusive outcomes across different platforms is less than 1.0. For example, if "Yes" is trading at 0.40 on Polymarket and "No" is trading at 0.55 on Kalshi, buying both guarantees a payout of 1.00 for a total cost of 0.95, before fees and slippage.
  • Liquidity check: Always check the /orderbooks endpoints. A price difference might exist, but if the orderbook lacks depth, executing the trade may eliminate the profit.

Pricing

APICost
Prediction market read query$0.01

Every response includes usage.cost and usage.credits_remaining.

Get Started

  1. Sign up at aisa.one
  2. Get your API key
  3. Add credits (pay-as-you-go)
  4. Set environment variable: export AISA_API_KEY="your-key"

Full API Reference

See API Reference for complete endpoint documentation.

Comments

Loading comments...