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.
STX.Sdk is the official .NET SDK for the SportsX trading exchange. It wraps the GraphQL HTTP API and Phoenix WebSocket channels as a set of strongly-typed services you register into the .NET dependency-injection container and resolve anywhere in your app. The primary audience is market makers building low-latency .NET trading bots, but any integrator targeting SportsX from a .NET app can use it.
Targets
net8.0. Published to NuGet as STX.Sdk. MIT-licensed.What the SDK includes
OneConfigureSTXServices call registers every component the SDK provides:
- HTTP services for every exchange operation: login, markets, events, orders, trades, settlements, profile, terms-and-conditions, and geolocation.
- WebSocket channel wrappers for real-time data: portfolio balance, active orders, active trades, positions, market price ticks, and user info.
- Automatic session management: background services keep the JWT refreshed and the geolocation token current so your bot stays connected without manual intervention.
Quick look
Where to go next
Installation
NuGet setup, supported runtimes, and package dependencies.
Authentication
Email/password login, 2FA, token refresh, and background session keep-alive.
Configuration
DI registration, environment endpoints, and logging setup.
Market data
Query markets, events, sports, and competitions.
Trading
Place, batch, and cancel orders; query order and trade history.
WebSockets
Phoenix channels for real-time orders, trades, balance, and price ticks.
Settlements
Fetch settlement history and subscribe to live settlement events.
Errors & retries
Typed exceptions, automatic Polly retries, and rate-limit guidance.
Example apps
Two reference apps ship alongside the SDK:cssdk-console— CLI trading bot demonstrating login, market subscriptions, and order placement from aBackgroundService.cssdk-demo— ASP.NET web API that exposes the SDK services over HTTP for manual testing.