# Prediction Market APIs

> Markets, events, prices and order books from Polymarket and Kalshi, for research, dashboards and trading agents.

Source: https://www.sandbase.ai/apis/prediction-markets

## APIs

- [Kalshi Get Kalshi Markets](https://www.sandbase.ai/apis/kalshi/markets.md): $0.02 per call; Get Kalshi Markets from Kalshi. Returns the official Kalshi API response unchanged.
- [Polymarket List events](https://www.sandbase.ai/apis/polymarket/events.md): $0.00044 per call; List events with offset based pagination and filter parameters.
- [Kalshi Get Market Price](https://www.sandbase.ai/apis/kalshi/markets-by-ticker.md): $0.02 per call; Get Market Price from Kalshi. Returns the official Kalshi API response unchanged.
- [Kalshi Get Kalshi Market OrderBook](https://www.sandbase.ai/apis/kalshi/markets-orderbook.md): $0.02 per call; Get Kalshi Market OrderBook from Kalshi. Returns the official Kalshi API response unchanged.
- [Kalshi Get Kalshi Trades](https://www.sandbase.ai/apis/kalshi/trades.md): $0.02 per call; Get Kalshi Trades from Kalshi. Returns the official Kalshi API response unchanged.
- [Polymarket Wallet Activity](https://www.sandbase.ai/apis/polymarket/activity.md): $0.012 per call; A wallet's activity feed: trades, splits, merges, redemptions, rewards and conversions, with time-range and type filters.
- [Polymarket Get order book](https://www.sandbase.ai/apis/polymarket/book.md): $0.012 per call; Retrieves the order book summary for a specific token ID. Includes bids, asks, market details, and last trade price.
- [Polymarket Builders Leaderboard](https://www.sandbase.ai/apis/polymarket/builders-leaderboard.md): $0.012 per call; Leaderboard of Polymarket builders (apps routing orders) by volume for a time period.
- [Polymarket Builders Volume](https://www.sandbase.ai/apis/polymarket/builders-volume.md): $0.012 per call; Daily, weekly or monthly volume of Polymarket builders over time.
- [Polymarket Get CLOB market info](https://www.sandbase.ai/apis/polymarket/clob-markets.md): $0.012 per call; Returns all CLOB-level parameters for a market in a single call — tokens, tick size, base fees, rewards, RFQ status, and fee details.
- [Polymarket Closed Positions](https://www.sandbase.ai/apis/polymarket/closed-positions.md): $0.012 per call; A wallet's closed positions with realized PnL, newest first, from the Data API v2.
- [Polymarket List comments](https://www.sandbase.ai/apis/polymarket/comments.md): $0.00044 per call; List comments from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get comments by comment id](https://www.sandbase.ai/apis/polymarket/comments-by-id.md): $0.00044 per call; Get comments by comment id from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get comments by user address](https://www.sandbase.ai/apis/polymarket/comments-user-address.md): $0.00044 per call; Get comments by user address from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get event by id](https://www.sandbase.ai/apis/polymarket/events-by-id.md): $0.00044 per call; Get event by id from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket List events (keyset pagination)](https://www.sandbase.ai/apis/polymarket/events-keyset.md): $0.00044 per call; List events with cursor based keyset pagination. Use next_cursor as after_cursor to fetch the next page. The offset parameter is rejected.
- [Polymarket Get event by slug](https://www.sandbase.ai/apis/polymarket/events-slug.md): $0.00044 per call; Get event by slug from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get event tags](https://www.sandbase.ai/apis/polymarket/events-tags.md): $0.00044 per call; Get event tags from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get fee rate](https://www.sandbase.ai/apis/polymarket/fee-rate.md): $0.012 per call; Retrieves the base fee rate for a specific token ID. The fee rate can be provided either as a query parameter or as a path parameter.
- [Polymarket Get fee rate by path parameter](https://www.sandbase.ai/apis/polymarket/fee-rate-by-token-id.md): $0.012 per call; Retrieves the base fee rate for a specific token ID using the token ID as a path parameter.
- [Polymarket Market Holders](https://www.sandbase.ai/apis/polymarket/holders.md): $0.00044 per call; Top holders of each outcome token in a market by condition ID, with balances and optional PnL.
- [Polymarket Get last trade price](https://www.sandbase.ai/apis/polymarket/last-trade-price.md): $0.012 per call; Retrieves the last trade price and side for a specific token ID. Returns default values of 0.5 for price and empty string for side if no trades found.
- [Polymarket Trader Leaderboard](https://www.sandbase.ai/apis/polymarket/leaderboard.md): $0.012 per call; Polymarket trader leaderboard by PnL or volume, for a time period and category.
- [Polymarket Live Event Volume](https://www.sandbase.ai/apis/polymarket/live-volume.md): $0.00044 per call; Live taker volume for an event by event ID, in total and per market.
- [Polymarket Market Positions](https://www.sandbase.ai/apis/polymarket/market-positions.md): $0.012 per call; Positions held in one market by condition ID, with each holder wallet, size, value and PnL.
- [Polymarket List markets](https://www.sandbase.ai/apis/polymarket/markets.md): $0.00044 per call; List markets from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get market by id](https://www.sandbase.ai/apis/polymarket/markets-by-id.md): $0.00044 per call; Get market by id from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get market by token](https://www.sandbase.ai/apis/polymarket/markets-by-token.md): $0.00044 per call; Get market by token from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket List markets (keyset pagination)](https://www.sandbase.ai/apis/polymarket/markets-keyset.md): $0.00044 per call; List markets (keyset pagination) from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get market by slug](https://www.sandbase.ai/apis/polymarket/markets-slug.md): $0.00044 per call; Get market by slug from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get market tags by id](https://www.sandbase.ai/apis/polymarket/markets-tags.md): $0.00044 per call; Get market tags by id from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get midpoint price](https://www.sandbase.ai/apis/polymarket/midpoint.md): $0.012 per call; Retrieves the midpoint price for a specific token ID. The midpoint is calculated as the average of the best bid and best ask prices.
- [Polymarket Open Interest](https://www.sandbase.ai/apis/polymarket/oi.md): $0.00044 per call; Open interest in USDC for one or more markets by condition ID.
- [Polymarket Wallet Positions](https://www.sandbase.ai/apis/polymarket/positions.md): $0.012 per call; A wallet's positions across their lifecycle (open, redeemable, mergeable, closed), with size, average price, current value and PnL.
- [Polymarket Get market price](https://www.sandbase.ai/apis/polymarket/price.md): $0.012 per call; Retrieves the best market price for a specific token ID and side (bid or ask). Returns the best bid price for BUY side or best ask price for SELL side.
- [Polymarket Get prices history](https://www.sandbase.ai/apis/polymarket/prices-history.md): $0.012 per call; Get prices history from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get public profile by wallet address](https://www.sandbase.ai/apis/polymarket/public-profile.md): $0.00044 per call; Get public profile by wallet address from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Search markets, events, and profiles](https://www.sandbase.ai/apis/polymarket/public-search.md): $0.012 per call; Search markets, events, and profiles from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get raw rewards for a specific market](https://www.sandbase.ai/apis/polymarket/rewards-markets.md): $0.012 per call; Get raw rewards for a specific market from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get current active rewards configurations](https://www.sandbase.ai/apis/polymarket/rewards-markets-current.md): $0.012 per call; Returns the current active rewards configurations for markets.
- [Polymarket Get multiple markets with rewards](https://www.sandbase.ai/apis/polymarket/rewards-markets-multi.md): $0.012 per call; Returns multiple markets with rewards and supports filtering and sorting.
- [Polymarket Get sampling markets](https://www.sandbase.ai/apis/polymarket/sampling-markets.md): $0.012 per call; Returns sampling markets with richer descriptive metadata, token summaries, and tags.
- [Polymarket Get sampling simplified markets](https://www.sandbase.ai/apis/polymarket/sampling-simplified-markets.md): $0.012 per call; Returns sampling simplified markets with reward and token summaries.
- [Polymarket List series](https://www.sandbase.ai/apis/polymarket/series.md): $0.00044 per call; List series from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get series by id](https://www.sandbase.ai/apis/polymarket/series-by-id.md): $0.00044 per call; Get series by id from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get simplified markets](https://www.sandbase.ai/apis/polymarket/simplified-markets.md): $0.012 per call; Returns simplified CLOB markets with token and reward summaries.
- [Polymarket Get sports metadata information](https://www.sandbase.ai/apis/polymarket/sports.md): $0.00044 per call; Get sports metadata information from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get valid sports market types](https://www.sandbase.ai/apis/polymarket/sports-market-types.md): $0.00044 per call; Get valid sports market types from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get spread](https://www.sandbase.ai/apis/polymarket/spread.md): $0.012 per call; Retrieves the spread for a specific token ID. The spread is the difference between the best ask and best bid prices.
- [Polymarket Get supported assets](https://www.sandbase.ai/apis/polymarket/supported-assets.md): $0.012 per call; Get supported assets for deposits and withdrawals on the bridge.
- [Polymarket List tags](https://www.sandbase.ai/apis/polymarket/tags.md): $0.00044 per call; List tags from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get tag by id](https://www.sandbase.ai/apis/polymarket/tags-by-id.md): $0.00044 per call; Get tag by id from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get related tags (relationships) by tag id](https://www.sandbase.ai/apis/polymarket/tags-related-tags.md): $0.00044 per call; Get related tags (relationships) by tag id from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get tags related to a tag id](https://www.sandbase.ai/apis/polymarket/tags-related-tags-tags.md): $0.00044 per call; Get tags related to a tag id from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get tag by slug](https://www.sandbase.ai/apis/polymarket/tags-slug.md): $0.00044 per call; Get tag by slug from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get related tags (relationships) by tag slug](https://www.sandbase.ai/apis/polymarket/tags-slug-related-tags.md): $0.00044 per call; Get related tags (relationships) by tag slug from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get tags related to a tag slug](https://www.sandbase.ai/apis/polymarket/tags-slug-related-tags-tags.md): $0.00044 per call; Get tags related to a tag slug from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket List teams](https://www.sandbase.ai/apis/polymarket/teams.md): $0.00044 per call; List teams from Polymarket. Returns the official Polymarket API response unchanged.
- [Polymarket Get tick size](https://www.sandbase.ai/apis/polymarket/tick-size.md): $0.012 per call; Retrieves the minimum tick size (price increment) for a specific token ID. The tick size can be provided either as a query parameter or as a path parameter.
- [Polymarket Get tick size by path parameter](https://www.sandbase.ai/apis/polymarket/tick-size-by-token-id.md): $0.012 per call; Retrieves the minimum tick size (price increment) for a specific token ID using the token ID as a path parameter.
- [Polymarket Get server time](https://www.sandbase.ai/apis/polymarket/time.md): $0.012 per call; Returns the current Unix timestamp of the server. This can be used to synchronize client time with server time.
- [Polymarket User Stats](https://www.sandbase.ai/apis/polymarket/traded.md): $0.012 per call; A wallet's profile stats: total trades, biggest win, profile views and join date.
- [Polymarket Portfolio Value](https://www.sandbase.ai/apis/polymarket/value.md): $0.012 per call; Current USD value of a wallet's open positions, optionally limited to given markets.

## Overview

### Real-money odds as data

Prediction markets price the probability of future events. These endpoints read events, markets, prices and trading activity, so you can track sentiment or feed it to an agent.

- **Polymarket:** events, markets, prices, order books, trades, positions, holders and leaderboards.
- **Kalshi:** markets, order books and trades.

All endpoints use `POST /v1/api/{vendor}/{endpoint}` and are billed per call.

## Start using Prediction Market APIs on SandBase

One key, one request pattern, billed per call.

1. **Create an API key** Sign in to the SandBase Console and create a key on the API Keys page. Keep it in an environment variable and never commit it to source control.

```
export SANDBASE_API_KEY="YOUR_SANDBASE_API_KEY"
```

2. **Call an endpoint** POST a JSON body to /v1/api/polymarket/events. Every endpoint on this page uses the same pattern.

```
curl https://api.sandbase.ai/v1/api/polymarket/events \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

3. **Let your agent call it** Connect the SandBase MCP server or CLI so an agent can discover and call these endpoints with your key.

```
npx -y @sandbaseai/cli@latest connect
```

## FAQ

### Can I place trades through these APIs?

No. These endpoints read public market data only.

### How fresh are prices?

Freshness depends on the endpoint; check each endpoint description.

### Which markets are covered?

Polymarket and Kalshi.

### How am I billed?

Per call, at the price on each endpoint card.

## Use it through SandBase

- Base URL: `https://api.sandbase.ai/v1`, with `Authorization: Bearer $SANDBASE_API_KEY`.
- Language models use the OpenAI-compatible `POST /v1/chat/completions`; media models use `POST /v1/run`; data APIs use `POST /v1/api/{vendor}/{endpoint}`.
- AI agents can connect through the SandBase MCP server or CLI: https://www.sandbase.ai/skill.md
- Every model and API page has a Markdown twin at the same URL plus `.md`. Full index: https://www.sandbase.ai/llms.txt
