Skip to main content

Welcome to the SportsX API

Real-time market data, order placement, portfolio management, and live WebSocket feeds — all through one GraphQL API, wrapped by a typed Python SDK. Start with the quickstart, browse the per-topic guides, or jump straight to the API reference.

Getting started

Quickstart

Install, authenticate, and make your first call in five minutes.

Installation

pip install stx-python, supported Python versions, platform notes.

Authentication

Email/password login, 2FA, environment variables, profile files.

Configuration

Regions, environments, ~/.stx/credentials profiles, schema pinning.

Core operations

Market data

Query markets, orderbooks, and event metadata with typed responses.

Trading

Place, cancel, and inspect orders; fetch positions and fill history.

WebSockets

Subscribe to Phoenix channels for live market and order updates.

Async HTTP

AsyncSTX — same surface as the sync client, awaitable, for bots and services.

Reference & tools

Errors & retries

Exception hierarchy, automatic retry policy, rate-limit handling.

API reference (compact)

Every operation on one page — Ctrl-F index to all 64 queries and mutations.

Reference by category

Per-category pages with parameters tables and examples for each op.

Python SDK on GitHub

Source, releases, issue tracker, and contribution guide.