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

# SportsX: prediction exchange API and SDKs

> SportsX gives you real-time market data, order placement, and live WebSocket feeds through a GraphQL API with official Python and C# SDKs.

## Welcome to the SportsX API (sync test 2026-04-27)

SportsX is a prediction exchange with official SDKs for Python and C#. Whether you're building a trading bot, a market-data dashboard, or a full application on top of the exchange, these docs cover everything you need — from your first authenticated call to production-grade order management and real-time WebSocket feeds.

<CardGroup cols={2}>
  <Card title="Python quickstart" icon="bolt" href="/sdks/python/quickstart">
    Install `stx-python`, authenticate, and make your first market query in under five minutes.
  </Card>

  <Card title="C# quickstart" icon="bolt" href="/sdks/csharp/quickstart">
    Add `STX.Sdk` via NuGet, register services, and place your first call in a .NET app.
  </Card>

  <Card title="Python SDK overview" icon="python" href="/sdks/python/overview">
    Synchronous, async, and WebSocket clients — one package, one set of credentials.
  </Card>

  <Card title="C# SDK overview" icon="code" href="/sdks/csharp/overview">
    DI-integrated .NET 8 SDK with typed services for every exchange operation.
  </Card>
</CardGroup>

## Core topics

<CardGroup cols={3}>
  <Card title="Market data" icon="chart-line" href="/sdks/python/markets">
    Query markets, orderbooks, and event metadata with field-level control.
  </Card>

  <Card title="Trading" icon="arrow-right-arrow-left" href="/sdks/python/trading">
    Place, cancel, and inspect orders. Fetch positions and fill history.
  </Card>

  <Card title="WebSockets" icon="tower-broadcast" href="/sdks/python/websockets">
    Subscribe to live market, order, and portfolio updates over Phoenix channels.
  </Card>

  <Card title="Authentication" icon="key" href="/sdks/python/authentication">
    Email/password login, 2FA, environment variables, and profile files.
  </Card>

  <Card title="Errors & retries" icon="triangle-exclamation" href="/sdks/python/errors-and-retries">
    Typed exception hierarchy and built-in retry policy with exponential backoff.
  </Card>

  <Card title="API reference" icon="book" href="/sdks/python/reference">
    All 51 GraphQL operations — queries, mutations, parameters, and return types.
  </Card>
</CardGroup>

## How to get started

<Steps>
  <Step title="Install the SDK">
    Pick your language and install the package.

    <CodeGroup>
      ```bash Python theme={null}
      pip install stx-python
      ```

      ```bash C# theme={null}
      dotnet add package STX.Sdk
      ```
    </CodeGroup>
  </Step>

  <Step title="Set your credentials">
    The SDK reads credentials from environment variables, a profile file, or constructor arguments.

    ```bash theme={null}
    export STX_EMAIL="you@example.com"
    export STX_PASSWORD="your-password"
    ```
  </Step>

  <Step title="Make your first call">
    Connect to staging and query the market list.

    ```python theme={null}
    from stx import STX, Selection

    client = STX(region="ontario", env="staging")
    markets = client.market_infos(
        selections=Selection("market_id", "status", "title"),
    )
    print(f"Got {len(markets)} markets")
    ```
  </Step>

  <Step title="Go deeper">
    Explore trading, WebSocket feeds, and the full API reference to build your integration.
  </Step>
</Steps>

<Note>
  Always develop against `env="staging"` before pointing at `env="production"`. Production trades with real balances.
</Note>
