Skip to main content
View on GitHub → Prediction-market discovery data for autonomous agents. One AISA_API_KEY reads mounted Polymarket and Kalshi endpoints for market discovery, event lookup, activity, and Kalshi trade history.

Install

First, install the AIsa CLI if you have not already:
npm install -g @aisa-one/cli
Then install the skill:
aisa skills install prediction-market-data

What can agents do with it?

Market discovery

“Find Polymarket and Kalshi markets related to a topic.”

Event lookup

“Browse Polymarket event groups and associated markets.”

Trade history

“Pull recent Kalshi trade records with optional ticker and block-trade filters.”

Activity checks

“Inspect Polymarket activity for a specific user over a time range.”

Liquidity triage

“Use volume and liquidity fields from market discovery responses to prioritize deeper venue checks.”

Research workflows

“Build candidate sets before using venue-native tools for pricing, orderbooks, or execution.”

Core capabilities

  • Market discovery — fetch Polymarket and Kalshi markets with provider-supported filters.
  • Event index — fetch Polymarket event/group data.
  • Trade history — fetch Kalshi trades using limit, cursor, ticker, min_ts, max_ts, and is_block_trade.
  • Activity lookup — fetch Polymarket user activity with user and optional time/market filters.
AIsa currently mounts the endpoints listed below. Older examples for AIsa-hosted price, orderbook, wallet, candlestick, and matching-market endpoints were removed because authenticated probes returned api endpoint not found.

Quick start

export AISA_API_KEY="your-key"

Polymarket

# Market discovery
curl "https://api.aisa.one/apis/v1/polymarket/markets?limit=5" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Events
curl "https://api.aisa.one/apis/v1/polymarket/events?limit=5" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Activity for a specific user address
curl "https://api.aisa.one/apis/v1/polymarket/activity?user=WALLET_ADDRESS&limit=5" \
  -H "Authorization: Bearer $AISA_API_KEY"

Kalshi

# Market discovery
curl "https://api.aisa.one/apis/v1/kalshi/markets?limit=5&status=open" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Trades
curl "https://api.aisa.one/apis/v1/kalshi/trades?limit=5&is_block_trade=false" \
  -H "Authorization: Bearer $AISA_API_KEY"

Python client

# Polymarket
python3 scripts/prediction_market_client.py poly markets --limit 5
python3 scripts/prediction_market_client.py poly events --limit 5
python3 scripts/prediction_market_client.py poly activity --user WALLET_ADDRESS --limit 5

# Kalshi
python3 scripts/prediction_market_client.py kalshi markets --limit 5 --status open
python3 scripts/prediction_market_client.py kalshi trades --limit 5 --is-block-trade false

Endpoint reference

EndpointMethodPurpose
/polymarket/marketsGETPolymarket markets
/polymarket/eventsGETPolymarket events
/polymarket/activityGETActivity
/kalshi/marketsGETKalshi markets
/kalshi/tradesGETKalshi trades

Get started

  1. Sign up at aisa.one (new accounts start with $2 free credit).
  2. Generate an API key from the console.
  3. export AISA_API_KEY="your-key" and install the skill:
    npm install -g @aisa-one/cli
    aisa skills install prediction-market-data
    

Prediction Market API reference

Mounted Polymarket and Kalshi discovery endpoints.

Arbitrage skill

Candidate discovery for cross-platform market research.

Error Codes

Handling upstream exchange errors.