This guide walks through the shortest path from zero to a working GraphQL call against SportsX staging.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.
Use staging for anything you’re building.
env="production" trades with real balances — don’t point a new integration at it until you’ve exercised the code path on staging.Prerequisites
- Python 3.9 or newer (
python3 --version) - An STX account that can log into app-staging.on.sportsxapp.com
pip(shipped with Python)
Walkthrough
Install the SDK
stx-python is in alpha on TestPyPI. Once stable it’ll be pip install stx-python from main PyPI. See Installation for the full story.Verify:Set credentials
The SDK reads credentials from three places, in this precedence: keyword arguments → environment variables → For long-lived setups, see Configuration → Profile files.
~/.stx/credentials profile.For a first run, env vars are fastest:Place a resting order (and cancel it)
Orders are authenticated the same way; no extra setup. The example
below places a deliberately-low LIMIT BUY at 1¢ — it sits in the
orderbook without filling, so you can exercise the API without
risking real positions.See Trading for batch ops, odds-orders, and the rest of the surface.
What you just did
- Installed
stx-pythonfrom PyPI. - Logged in with email/password — the SDK cached a JWT and will auto-refresh it at minute 59 of each 60-minute window.
- Ran a GraphQL query with a narrowed field
Selection(small payload). - Previewed an order without hitting the order book.
- (Optionally) joined a Phoenix channel for live market updates.
Next steps
Authentication
2FA, long-lived profiles, and how tokens are refreshed.
Market data
Query orderbooks, event metadata, and historical data.
Trading
Place, cancel, and amend orders; fetch positions and fills.
WebSockets
Subscribe to the full catalog of Phoenix channels.