Prediction Market Arbitrage Api

v1.0.0

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

0· 15·0 current·0 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description (cross-platform arbitrage via AIsa) match the included scripts and required resources: python3 and AISA_API_KEY. All network calls point to api.aisa.one, which is consistent with the stated provider.
Instruction Scope
SKILL.md instructs only read-only queries (scan, match, orderbook checks) against AIsa endpoints and running the provided Python scripts. The code only reads AISA_API_KEY from environment and performs HTTPS GETs. Note: the client exposes endpoints for wallet/activity/positions if you supply wallet addresses — these will fetch on-chain/public wallet data and are not automatically used unless you call those commands.
Install Mechanism
No install spec; this is instruction+script only. No downloads or archive extraction. The code runs with the existing python3 binary.
Credentials
Only AISA_API_KEY is required. No other credentials, config paths, or secrets are requested. Requests for wallet addresses are optional CLI inputs, not environment variables or private keys.
Persistence & Privilege
always is false and the skill does not modify other skills or system config. It can be invoked autonomously (platform default) but that is not itself unusual and the skill does not request elevated persistence.
Assessment
This skill appears coherent: it needs python3 and an AIsa API key to perform read-only queries against api.aisa.one. Before installing, verify the reputation and billing model of aisa.one (queries are paid), keep your AISA_API_KEY secret, and do not supply private wallet keys — only public wallet addresses are sometimes used to fetch activity. Because the package origin/homepage is not provided, consider auditing the included scripts locally and running them in a controlled environment (or with a limited/monitorable API key) before giving the skill broad autonomous access.

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

latestvk973h2et1g752pb9n2t7g17r3h842bc4

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

⚖️ Clawdis
Binspython3
EnvAISA_API_KEY
Primary envAISA_API_KEY

SKILL.md

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 <slug>

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

Verify liquidity before acting

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

Commands

arbitrage_finder.py — Automated Detection

python3 {baseDir}/scripts/arbitrage_finder.py scan <sport> --date <YYYY-MM-DD> [--min-spread <pct>] [--min-liquidity <usd>] [--json]
python3 {baseDir}/scripts/arbitrage_finder.py match --polymarket-slug <slug> [--min-spread <pct>] [--min-liquidity <usd>] [--json]
python3 {baseDir}/scripts/arbitrage_finder.py match --kalshi-ticker <ticker> [--min-spread <pct>] [--min-liquidity <usd>] [--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 <kw> --status open --limit 5
python3 {baseDir}/scripts/prediction_market_client.py kalshi markets --search <kw> --status open --limit 5

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

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

# Orderbook depth
python3 {baseDir}/scripts/prediction_market_client.py polymarket orderbooks --token-id <id>
python3 {baseDir}/scripts/prediction_market_client.py kalshi orderbooks --ticker <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.

Files

3 total
Select a file
Select a file to preview.

Comments

Loading comments…