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

# Introduction

> PredictStreet is an institutional-grade prediction-market platform with on-chain custody, an off-chain central-limit orderbook, and automated oracle settlement.

## Who this is for

This documentation is for teams integrating with PredictStreet:

<CardGroup cols={2}>
  <Card title="Market makers" icon="chart-candlestick">
    Provide liquidity across binary and categorical markets using the
    EIP-712 signed-order flow. Hot path is HTTP + WebSocket; settlement
    is on-chain with a dual-signature vault custody model.
  </Card>

  <Card title="Trading partners" icon="handshake">
    Route customer flow into PredictStreet markets via a key-authenticated
    REST API ([API keys](/auth/api-keys)), real-time market data
    feeds, and a predictable fee schedule derived from the on-chain
    quadratic taker-fee curve.
  </Card>

  <Card title="Liquidity aggregators" icon="network-wired">
    Consume market, orderbook, and trade streams to integrate PredictStreet
    pricing into your own distribution surfaces. Read-only access is
    available without posting collateral.
  </Card>

  <Card title="Research / analytics" icon="flask">
    Access historical trades, fee ledger, and on-chain settlement records
    for modelling, benchmarking, and market-microstructure research.
  </Card>
</CardGroup>

## What PredictStreet is

A regulated prediction-market platform running on a dedicated L2 with
the following architectural split:

* **Off-chain hot path** — order intake, signature validation, balance
  locking, matching, and trade recording happen off-chain for sub-second
  latency.
* **On-chain custody** — every user's collateral and outcome-token
  balances live in their own EIP-1167 vault clone, not in an exchange-
  owned pooled contract. Nothing moves without the user's EIP-712
  signature.
* **On-chain settlement** — fills are batched to the CTFExchange contract;
  withdrawals, split/merge, and neg-risk conversions require dual
  signatures (user + backend co-signer) with no unilateral backend
  authority.
* **Automated oracle** — three independent sports data feeds
  (Stats Perform primary + API-Football + SportMonks) feed a consensus
  resolver. Every outcome posted on-chain has a 2-hour challenge window
  backed by a bond mechanism.

## How the docs are organised

<Steps>
  <Step title="Getting Started">
    Start with the [Quickstart](/quickstart) for a 5-minute hello-world,
    or the [Platform overview](/platform-overview) for a conceptual
    picture before writing code.
  </Step>

  <Step title="Concepts">
    Each major surface (trading, markets, portfolio, withdrawals,
    WebSocket, settlement, contracts) has a dedicated concept section
    that explains the model and then links to the exact endpoints
    involved.
  </Step>

  <Step title="API Reference">
    The **API Reference** tab catalogues every HTTP endpoint, its
    request / response schemas, and example payloads, with a
    try-it-out panel for supported environments.
  </Step>
</Steps>

## API surface at a glance

| Surface                                                                                                                                | Transport   | Auth                               | Intended use                             |
| -------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ---------------------------------- | ---------------------------------------- |
| `GET /api/markets/*`, `/api/events/*`, `/api/matches/*`, `/api/tags`, `/api/platform/*`, `/api/compliance/geo`                         | HTTP / JSON | public                             | Public market data and platform status   |
| `POST /api/orders/place`, `/api/orders/cancel`, `/api/orders/cancel-all`                                                               | HTTP / JSON | API key (`orders:write`) + EIP-712 | Place / cancel signed orders             |
| `GET /api/orders/*`                                                                                                                    | HTTP / JSON | API key (`orders:read`)            | List / read own orders                   |
| `GET /api/me/vault`, `/me/balances`, `/me/positions`, `/me/trades`, `/me/fees`, `/me/fee-tier`, `/me/portfolio`, `/me/vault/emergency` | HTTP / JSON | API key (`portfolio:read`)         | Portfolio, balances, trades, fees        |
| `POST /api/vault/split-signature`, `/api/vault/merge-signature`                                                                        | HTTP / JSON | API key (`vault:write`) + EIP-712  | Backend co-signed ERC-1155 split / merge |

See [Authentication overview](/auth/overview) and [API keys](/auth/api-keys) for the partner authentication flow. Retail user logins (SIWE) live on `app.predictstreet.io` and are out of scope for this documentation.

## Environments

<Tip>
  All examples in this documentation use the **testnet** environment by
  default. Production endpoints require a separate partner onboarding
  step — contact [partners@predictstreet.com](mailto:partners@predictstreet.com).
</Tip>

| Environment | Base URL                                                  | Chain                       | Purpose                                       |
| ----------- | --------------------------------------------------------- | --------------------------- | --------------------------------------------- |
| **Testnet** | `https://core.api.dev.predictstreet.sde.adifoundation.ai` | ADI testnet (chainId 99999) | Integration, smoke tests, partner development |
| **Staging** | Available on request                                      | ADI testnet                 | Pre-production dry-run                        |
| **Mainnet** | On partner onboarding                                     | TBD                         | Live trading                                  |

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Place your first order in 5 minutes.
  </Card>

  <Card title="Platform overview" icon="sitemap" href="/platform-overview">
    Understand the off-chain / on-chain split before writing code.
  </Card>

  <Card title="Authentication" icon="key" href="/auth/api-keys">
    API keys — issuance, format, scopes, rotation.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Jump straight into the endpoint catalogue.
  </Card>
</CardGroup>
