Skip to main content

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 distributed as a single NuGet package. You add one reference and the SDK handles everything else — GraphQL transport, WebSocket channels, JWT management, and Polly retries are all included transitively.

Add the package

dotnet add package STX.Sdk
Or search for STX.Sdk in Visual Studio’s NuGet Package Manager UI. Package page: nuget.org/packages/STX.Sdk

Runtime requirements

Target frameworknet8.0
Minimum .NET SDK8.0
PlatformsWindows, macOS, Linux — any platform that runs .NET 8
Older versions of the package targeted net7.0. New projects should start on .NET 8.

Transitive dependencies

You do not need to reference any of these directly — they come in automatically with STX.Sdk:
PackagePurpose
GraphQL.Client + GraphQL.Client.Serializer.NewtonsoftTyped GraphQL transport
Microsoft.Extensions.Hosting.AbstractionsDI container and BackgroundService base classes
Microsoft.Extensions.HttpIHttpClientFactory
Microsoft.Extensions.Logging.AbstractionsILogger<T>
Microsoft.IdentityModel.Tokens, System.IdentityModel.Tokens.JwtJWT parsing
PollyRetry and transient-fault handling for GraphQL calls

Using the SDK without a full host

The canonical pattern uses Host.CreateDefaultBuilder because it starts the DI container and runs background services (session keep-alive, geolocation). For lightweight scripts you can build your own ServiceCollection instead:
var services = new ServiceCollection();
services.ConfigureSTXServices(
    graphQLUri:  "https://in-api-staging.stxapp.io/graphiql",
    channelsUri: "wss://in-api-staging.stxapp.io/socket/websocket?token={0}&vsn=2.0.0");

var provider = services.BuildServiceProvider();
var login = provider.GetRequiredService<STXLoginService>();
Background services (STXSessionBackgroundService, STXGeoLocationBackgroundService) won’t start automatically without a proper IHost. If you need automatic token refresh or geolocation, either run under Host.CreateDefaultBuilder or start those services explicitly.

Versioning

STX.Sdk follows semantic versioning:
  • Major — breaking API changes
  • Minor — new services or methods (backwards-compatible)
  • Patch — bug fixes
Releases are tag-driven from the cssdk repo and published to NuGet automatically on each release tag.