.NET 8. Targets
net8.0. Published to NuGet as STX.Sdk. MIT-licensed.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 services you register into the .NET dependency-injection container and resolve anywhere in your app.
One package, one ConfigureSTXServices call, dozens of typed service + channel clients.
- Services for everything the exchange exposes: login, markets, events, orders, trades, settlements, profile, terms-and-conditions, geolocation.
- Channel wrappers for real-time: portfolio balance, active orders/trades, positions, market updates, user info.
- Automatic session management: optional background services keep the JWT refreshed and the geolocation token current.
Where to go next
Quickstart
Install, authenticate, and make your first call in under five minutes.
Installation
NuGet, supported runtimes, dependencies.
Authentication
Email/password login, 2FA, token refresh, background session.
Configuration
DI registration, endpoint URIs per environment.
Market data
Query markets, events, sports, and competitions.
Trading
Place and cancel orders; fetch order/trade history.
WebSockets
Phoenix channels for real-time orders, trades, balance, markets.
Errors & retries
Exceptions you’ll encounter and the built-in Polly retry.
Example apps
Two reference apps ship alongside the SDK:cssdk-console— CLI trading bot showing login, market subscriptions, and order placement from aBackgroundService.cssdk-demo— ASP.NET web API exposing the services over HTTP for manual poking.

