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

# Predexon Partner API

> Unified prediction market infrastructure for enterprise partners

# Predexon Partner API

Predexon aggregates sports betting markets across **5 prediction market venues** into a single unified API. One integration gives your users access to every venue's liquidity, prices, and outcomes — with deterministic cross-venue matching, canonical identifiers, and best-price routing.

## Venues

| Venue           | Type                    | Coverage                            |
| --------------- | ----------------------- | ----------------------------------- |
| **Polymarket**  | On-chain (Polygon)      | All leagues                         |
| **Kalshi**      | Regulated exchange (US) | All leagues                         |
| **Predict.fun** | On-chain (Polygon)      | US sports + major European football |
| **Limitless**   | On-chain (Base)         | European football                   |
| **Opinion**     | On-chain (Polygon)      | NBA + select European football      |

## Supported Sports & Leagues

Predexon currently supports **game\_winner** markets across 4 sports and 13 leagues. Use `GET /v2/sports/categories` for the live list of leagues with active games.

| Sport          | Leagues                                                                            | Market Type                                     |
| -------------- | ---------------------------------------------------------------------------------- | ----------------------------------------------- |
| **Basketball** | NBA                                                                                | 2-way (Team A vs Team B)                        |
| **Hockey**     | NHL                                                                                | 2-way                                           |
| **Baseball**   | MLB                                                                                | 2-way                                           |
| **Soccer**     | EPL, La Liga, Serie A, Ligue 1, Bundesliga, UCL, UEL, MLS, Eredivisie, Brasileirao | 3-way (Team A vs Draw vs Team B). MLS is 2-way. |

<Info>
  NFL and College Football are supported but currently off-season. They will appear in `GET /v2/sports/categories` when venues begin listing games for the next season.
</Info>

### League Codes

These are the `league` values you pass to API query parameters:

| Code  | League           | Sport      |
| ----- | ---------------- | ---------- |
| `nba` | NBA              | Basketball |
| `nhl` | NHL              | Hockey     |
| `mlb` | MLB              | Baseball   |
| `epl` | Premier League   | Soccer     |
| `lal` | La Liga          | Soccer     |
| `sea` | Serie A          | Soccer     |
| `fl1` | Ligue 1          | Soccer     |
| `bun` | Bundesliga       | Soccer     |
| `ucl` | Champions League | Soccer     |
| `uel` | Europa League    | Soccer     |
| `mls` | MLS              | Soccer     |
| `ere` | Eredivisie       | Soccer     |
| `bra` | Brasileirao      | Soccer     |

<Info>
  For the `sport` parameter, use the full sport name: `basketball`, `soccer`, `hockey`, or `baseball`. League codes like `nba` go in the `league` parameter — passing `sport=nba` will return a 400 error.
</Info>

***

## API Endpoints

Predexon provides two views of sports market data plus supporting lookups. Each serves a different integration pattern.

### Discovery Endpoints

<CardGroup cols={2}>
  <Card title="List Games (Aggregated)" icon="trophy" href="/api-reference/sports/games">
    **Best prices across all venues.** Venues are abstracted away — each outcome shows the best available YES and NO prices with a stable `predexon_id` for order routing. Use this to build a trading UI where users see one price per outcome.
  </Card>

  <Card title="List Markets (Per-Venue)" icon="layer-group" href="/api-reference/sports/markets">
    **Full venue-level detail.** Every venue's native identifiers, prices, volume, and liquidity nested under each game. Use this for arbitrage detection, venue comparison, or when you need venue-specific metadata.
  </Card>
</CardGroup>

### Supporting Endpoints

<CardGroup cols={3}>
  <Card title="List Categories" icon="list" href="/api-reference/sports/categories">
    Live sport/league hierarchy. Use to populate filter dropdowns and discover which leagues have active games.
  </Card>

  <Card title="Get Single Game" icon="baseball" href="/api-reference/sports/get-market">
    Fetch a single game by `game_id` with full per-venue detail. Same structure as `/markets` but for one game.
  </Card>

  <Card title="Outcome Lookup" icon="magnifying-glass" href="/api-reference/sports/outcomes">
    Given a `predexon_id`, find every equivalent outcome across all venues. Supports single and batch lookups.
  </Card>
</CardGroup>

### Trading — Order Router

Hosted at `https://trade.predexon.com`. Takes the `predexon_id`s returned by the discovery endpoints and executes across every routed venue that lists the outcome — with cross-venue splitting, fee-inclusive ranking, and a unified response.

`predexon_id` is canonical at the outcome level. It is the stable Predexon ID for the tradeable outcome across matched venues, not a venue-native token or ticker.

Order routing endpoints operate on a **trading account** — every router call is scoped to an `accountId`. Account creation, funding, and the rest of the lifecycle are documented in the [Trading API accounts docs](https://docs.predexon.com/trading-api/accounts/create-account).

<CardGroup cols={2}>
  <Card title="Order Router Concepts" icon="route" href="/concepts/order-router">
    How smart routing works: routed venues, `predexon_id` as the outcome identifier, partial fills, and fee handling.
  </Card>

  <Card title="Quote" icon="magnifying-glass-chart" href="/api-reference/router/quote">
    Simulate a fill across every routed venue. Returns projected price, per-venue breakdown, and fill likelihood.
  </Card>

  <Card title="Place Market Order" icon="bolt" href="/api-reference/router/place-order">
    Execute a market order. The router splits across venues, dispatches in parallel, and returns one unified response.
  </Card>

  <Card title="Positions" icon="wallet" href="/api-reference/router/positions">
    Positions aggregated by `predexon_id` with cost basis, live value, P\&L, and lifecycle state.
  </Card>
</CardGroup>

***

## Integration Patterns

### Pattern 1: Simple Trading UI

For showing users a list of games with best prices and letting them trade:

```
1. GET /v2/sports/categories          → build league picker
2. GET /v2/sports/games?league=nba    → show games with best prices
3. User clicks "Hawks YES at 0.33"    → use the predexon_id from the response
4. GET /v2/sports/outcomes/{predexon_id} → find all venues for routing
5. Route order to venue with best price
```

### Pattern 2: Arbitrage / Venue Comparison

For comparing prices across venues to find inefficiencies:

```
1. GET /v2/sports/markets?league=epl  → full venue breakdown per game
2. Compare prices for same outcome across venues
3. Identify spreads where venue A's YES + venue B's NO < 1.0
```

### Pattern 3: Market Data Feed

For ingesting all available sports market data:

```
1. GET /v2/sports/categories          → enumerate all leagues
2. For each league:
   GET /v2/sports/markets?league={code}&limit=200
   Repeat with pagination_key while pagination.has_more is true.
3. Poll every 60s (respects cache TTL)
```

***

## Authentication

Predexon issues two key types — pass the right one in the `x-api-key` header for each surface:

| Key             | Surface                      | Used by                                                                             |
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------- |
| **Data key**    | `https://api.predexon.com`   | Sports Discovery (`/v2/sports/*`)                                                   |
| **Trading key** | `https://trade.predexon.com` | Order Router (`/api/accounts/{accountId}/router/*`) and per-venue trading endpoints |

```bash theme={null}
# Data key — Sports Discovery
curl --url 'https://api.predexon.com/v2/sports/games?league=nba&limit=5' \
     --header 'x-api-key: YOUR_DATA_KEY'

# Trading key — Order Router
curl --url 'https://trade.predexon.com/api/accounts/{accountId}/router/positions' \
     --header 'x-api-key: YOUR_TRADING_KEY'
```

***

## Quick Start

Fetch today's NBA games with best prices across all venues:

```bash theme={null}
curl --url 'https://api.predexon.com/v2/sports/games?league=nba' \
     --header 'x-api-key: YOUR_DATA_KEY'
```

Fetch the same games with full per-venue detail:

```bash theme={null}
curl --url 'https://api.predexon.com/v2/sports/markets?league=nba' \
     --header 'x-api-key: YOUR_DATA_KEY'
```

Find all venues offering a specific outcome for order routing:

```bash theme={null}
curl --url 'https://api.predexon.com/v2/sports/outcomes/px-uvtpjis2k7bj' \
     --header 'x-api-key: YOUR_DATA_KEY'
```
