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

# Unified Execution Infra

> A prime-broker-style trading layer for prediction markets — one API, one funding flow, one set of keys, every venue.

<Warning>
  **The Predexon Trading API is being retired.** New signups are closed. **Trading stops on June 25, 2026** — sell or close any open positions before then. After that, the API is withdrawal-only: **redeem resolved positions and withdraw all funds by June 29, 2026.** The read-only [Data & Signals API](/data-signals/overview) is unaffected.
</Warning>

This tab documents the Predexon Trading API — a prime-broker-style layer that lets you place and manage trades across every major prediction market without running wallet, custody, or signing infrastructure yourself. **The API is now being wound down (see above);** existing accounts should cancel, redeem, and withdraw before the deadlines.

<Note>
  **Funding model**: Polymarket, Predict.fun, Opinion, and Limitless fund through one Base USDC deposit wallet via `POST /transfers`. Hyperliquid funds separately via [Across](https://across.to). See [Funding & Withdrawals](/trading-api/guides/funding-and-withdrawals).
</Note>

***

## What you get

<CardGroup cols={2}>
  <Card title="Managed wallets" icon="vault">
    Per-venue wallets provisioned on demand via Turnkey. No private keys to store, no signing flow to build. One account spans every supported venue.
  </Card>

  <Card title="One funding flow" icon="wallet">
    Single USDC deposit wallet on Base. Move funds to any enabled venue with `POST /transfers`. Bridge from Ethereum, Arbitrum, Polygon, BSC, or Optimism via Quote Transfer.
  </Card>

  <Card title="Per-venue order shapes" icon="sliders">
    Need full control? Place orders directly against a specific venue with native order types, with normalized request and response shapes.
  </Card>

  <Card title="Partner fees" icon="percent">
    Monetize an integration by attaching a partner fee policy. Set per-venue rates, take a cut of every fill.
  </Card>

  <Card title="Position management" icon="layer-group">
    Aggregated positions across venues, redemption of resolved markets, and consolidation back to your deposit wallet — all from one API.
  </Card>
</CardGroup>

***

## Winding down your account

New account creation is closed, and trading stops on June 25, 2026. The path that matters now: **cancel open orders → redeem resolved positions → withdraw.** Full walkthrough in [Funding & Withdrawals →](/trading-api/guides/funding-and-withdrawals)

```python Python theme={null}
import requests

HEADERS = {"x-api-key": "YOUR_API_KEY", "Content-Type": "application/json"}
BASE = "https://trade.predexon.com"
account_id = "YOUR_ACCOUNT_ID"

# 1. Cancel any open orders on a venue
requests.delete(
    f"{BASE}/api/accounts/{account_id}/orders?venue=polymarket",
    headers=HEADERS,
)

# 2. Redeem resolved positions — see Redeem Position
#    POST /api/accounts/{account_id}/redeem

# 3. Drain the venue back to the deposit wallet, then withdraw to your own address
requests.post(
    f"{BASE}/api/accounts/{account_id}/transfers",
    headers=HEADERS,
    json={"from": "polymarket", "to": "deposit", "amount": "10"},
)
requests.post(
    f"{BASE}/api/accounts/{account_id}/transfers",
    headers=HEADERS,
    json={
        "from": "deposit",
        "to": "external",
        "amount": "10",
        "destination": {"address": "0xYourAddress", "chain": "base", "token": "USDC"},
    },
).json()
```

***

## What's in this tab

<CardGroup cols={2}>
  <Card title="Market Discovery" icon="diagram-project" href="/api-reference/canonical/markets">
    Canonical markets, venue listings, outcome resolution, and matched pairs — the unified cross-venue discovery layer.
  </Card>

  <Card title="Accounts & Custody" icon="user-shield" href="/trading-api/accounts/create-account">
    Create accounts, enable venues, query balances and positions, redeem resolved markets, withdraw funds.
  </Card>

  <Card title="Funding & Transfers" icon="arrow-right-arrow-left" href="/trading-api/funds/deposit-info">
    Deposit info, internal transfers (deposit ↔ venue), cross-chain bridging via Quote Transfer.
  </Card>

  <Card title="Venue-Specific Orders" icon="sliders" href="/trading-api/accounts/place-order">
    Native per-venue orders when you want explicit control. Normalized request and response shapes.
  </Card>

  <Card title="Partner Fees" icon="percent" href="/trading-api/fees/get-fee-policy">
    Set per-venue fee rates and earn a share of every fill from accounts owned by your API key.
  </Card>

  <Card title="Guides" icon="book" href="/trading-api/guides/placing-trades">
    End-to-end walkthroughs for funding, placing trades, and fee monetization.
  </Card>
</CardGroup>

***

## Supported venues

| Venue           | Chain     | Collateral         | Order types   |
| --------------- | --------- | ------------------ | ------------- |
| **Polymarket**  | Polygon   | pUSD               | Limit, market |
| **Predict.fun** | BSC       | USDT               | Limit, market |
| **Opinion**     | BSC       | USDT               | Limit, market |
| **Limitless**   | Base      | USDC               | Limit, market |
| **Hyperliquid** | HyperCore | USDH (USDC-pegged) | Limit, market |

Funding to Polymarket, Predict.fun, Opinion, and Limitless goes through the deposit wallet via `POST /transfers`. Hyperliquid funding uses [Across](https://across.to) — see [Funding & Withdrawals](/trading-api/guides/funding-and-withdrawals) for the details.

***

## Discovering markets to trade

Market discovery is built into this tab — the **Market Discovery** section gives you the unified Predexon-native view:

* [Canonical Markets](/api-reference/canonical/markets) — cross-venue market containers with outcome-level `predexon_id`s
* [Canonical Listings](/api-reference/canonical/listings) — venue-native execution metadata behind each outcome
* [Canonical Outcome](/api-reference/canonical/outcome) — resolve a `predexon_id` to every venue listing for that outcome
* [Matched Pairs](/api-reference/matching/matched-pairs) — pre-computed cross-venue arb candidates

For raw per-venue market data (Polymarket markets, Kalshi tickers, etc.), text search, candles, or wallet analytics, jump to [Data & Signals →](/data-signals/overview)

***

## Account Limits

Each API key can create accounts up to its plan limit:

| Tier       | Account limit |
| ---------- | ------------- |
| Free       | 5             |
| Dev        | 50            |
| Pro        | 1,000         |
| Enterprise | Custom        |

***

## Error Handling

Every error response uses the same envelope:

```json theme={null}
{
  "error": "insufficient_balance",
  "message": "Insufficient balance: need 50.000000, have 12.500000",
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
```

* **`error`** — stable snake\_case code. Branch on this; it never changes value once shipped.
* **`message`** — human-readable explanation. Free-form, may change; show it to humans but don't parse it.
* **`requestId`** — request correlation id, also returned in the `x-request-id` response header. Quote it when contacting support.

| Status | Common error codes                                                                                                  | Action                                 |
| ------ | ------------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| 400    | `validation_error`, `missing_field`, `invalid_field`, `insufficient_balance`, `min_notional_not_met`, `parse_error` | Fix the request and retry              |
| 401    | `unauthorized`, `invalid_api_key`                                                                                   | Check your `x-api-key` header          |
| 403    | `forbidden`, `account_not_owned`                                                                                    | Verify the account belongs to your key |
| 404    | `account_not_found`, `order_not_found`, `transfer_not_found`, `endpoint_not_found`                                  | Check the ID or URL                    |
| 409    | `conflict`, `nonce_replay`                                                                                          | Retry the request                      |
| 413    | `payload_too_large`                                                                                                 | Reduce the request body size           |
| 429    | `rate_limited`                                                                                                      | Back off; respect tier limits          |
| 5xx    | `internal_error`, `upstream_error`                                                                                  | Retry with exponential backoff         |

Retry `5xx` errors with exponential backoff. Do not retry `4xx` errors — they indicate a problem with the request.

<Note>
  `POST /api/accounts/{accountId}/transfers` returns a **resource body with `status: 'failed'`** instead of an error envelope when the operation ran but didn't deliver — if the on-chain transfer reverted, it returns `201` with `transfer.status === 'failed'`. Read `transfer.error` / `transfer.errorCode`.

  The API call succeeded — the *resource* failed. Branch on `status`, not on HTTP code.
</Note>

***

## Authentication & limits

All endpoints in this tab live on `https://trade.predexon.com` and authenticate via the `x-api-key` header — the same key you use for Data & Signals. Trading API calls are free on every plan and never count toward your Data API request quota. See [Authentication](/authentication) and [Rate limits](/rate-limits) in **Start Here** for full plan details.
