> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Prediction Market Arbitrage

> Cross-platform prediction-market research using the currently mounted Polymarket and Kalshi discovery endpoints.

[View on GitHub →](https://github.com/AIsa-team/agent-skills/tree/main/financial/prediction-market-arbitrage)

**Research prediction-market opportunities with AIsa.** One `AISA_API_KEY` can pull mounted Polymarket and Kalshi market-discovery data so agents can identify candidate events before using venue-specific tooling for pricing, orderbook depth, or execution.

## Install

```bash npx skills theme={null}
npx skills add AIsa-team/agent-skills --skill prediction-market-arbitrage
```

```bash AIsa CLI theme={null}
npm install -g @aisa-one/cli
aisa skills install prediction-market-arbitrage
```

Start a new agent session after installing so the skill loads.

## What can agents do with it?

> [card] Cross-market discovery
>
> "Find related NFL, macro, or election markets on Polymarket and Kalshi."

> [card] Candidate pairing
>
> "Compare titles, event tickers, slugs, and close times to identify likely equivalent markets."

> [card] Liquidity triage
>
> "Use volume and liquidity fields from discovery responses to prioritize venues for deeper checks."

> [card] Sports research workflow
>
> "Build a same-day candidate list from available Polymarket and Kalshi market feeds."

> [card] Elections & macro
>
> "Surface comparable event markets before running venue-specific pricing checks."

> [card] Execution prep
>
> "Produce a research shortlist; perform execution and orderbook checks directly with each venue."

## How it works

**1. Discover candidate markets**

Query `/polymarket/markets`, `/polymarket/events`, and `/kalshi/markets` to find relevant market/event records.

**2. Pair likely equivalents**

Match candidates by title, event ticker, slug, event date, sport/team names, or market close time.

**3. Validate pricing outside this AIsa surface**

Use venue-native APIs or trading systems for current price, orderbook depth, and execution checks before trading.

> [!WARNING]
>
> AIsa currently mounts the Prediction Market discovery endpoints listed below. Older examples for AIsa-hosted `market-price`, `orderbooks`, and `matching-markets` routes were removed because authenticated probes returned `api endpoint not found`.

## Quick start

```bash theme={null}
export AISA_API_KEY="your-key"
```

### 1. Find Polymarket candidates

```bash theme={null}
curl "https://api.aisa.one/apis/v1/polymarket/markets?limit=5" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

### 2. Find Kalshi candidates

```bash theme={null}
curl "https://api.aisa.one/apis/v1/kalshi/markets?limit=5&status=open" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

### 3. Compare manually or with venue-native tooling

Use shared fields such as Polymarket `slug`/`question` and Kalshi `ticker`/`event_ticker`/`title` to pair likely equivalents, then verify live prices and orderbooks with the relevant venue's official API before execution.

## Endpoint reference

| Endpoint | Method | Purpose |
| - | - | - |
| `/polymarket/markets` | GET | [Polymarket markets](https://aisa.one/docs/api-reference/prediction-market/get_polymarket-markets.md) |
| `/polymarket/events` | GET | [Polymarket events](https://aisa.one/docs/api-reference/prediction-market/get_polymarket-events.md) |
| `/polymarket/activity` | GET | [Polymarket activity](https://aisa.one/docs/api-reference/prediction-market/get_polymarket-activity.md) |
| `/kalshi/markets` | GET | [Kalshi markets](https://aisa.one/docs/api-reference/prediction-market/get_kalshi-markets.md) |
| `/kalshi/trades` | GET | [Kalshi trades](https://aisa.one/docs/api-reference/prediction-market/get_kalshi-trades.md) |

## Get started

1. Sign up at [aisa.one](https://aisa.one) and create an API key in the console.
2. Set it in your shell: `export AISA_API_KEY="your-key"`.
3. Install the skill with one of the commands under [Install](#install), then start a new agent session.

## Related

> [card] [Prediction Market API](https://aisa.one/docs/api-reference/prediction-market/get_polymarket-markets.md)
>
> Mounted Polymarket and Kalshi discovery endpoints.

> [card] [Market Data skill](https://aisa.one/docs/agent-skills/prediction-market-data.md)
>
> The underlying data skill this one builds on.

> [card] [Rate Limits](https://aisa.one/docs/api-reference/rate-limits.md)
>
> Concurrency caps when running research scans.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.