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.

The SportsX C# SDK exposes its functionality through a set of focused service classes that you register with the .NET dependency-injection container. Each service is transient unless otherwise noted, meaning the container creates a new instance per resolution. The sections below list every service and channel shipped in STX.Sdk, with one-line descriptions and links to the detailed reference pages. For task-oriented walkthroughs, see the authentication, markets, and trading guides.

Market data

STXMarketService, STXEventService — list, filter, and fetch markets and events.

Trading

STXOrderService, STXTradeService — place and cancel orders, query fills.

Account

STXProfileService, STXSettlementService, STXTermsAndConditionsService.

Auth & 2FA

STXLoginService, STXTokenService, session lifecycle.

Services

IAuthService — STXLoginService

MethodDescription
LoginAsyncAuthenticates with email and password, optionally starts session keep-alive and checks pending T&Cs.

IAuthService — STXTokenService

MethodDescription
LoginAsyncLow-level login — use directly when you need fine-grained control over the login/2FA/T&C flow.
Confirm2FAAsyncCompletes a two-factor authentication challenge using the OTP code and the SessionId from the initial login response.
RefreshTokenAsyncExchanges the stored refresh token for a fresh JWT. Throws STXSessionExpiredException when both tokens have expired.

IMarketService — STXMarketService

MethodDescription
GetMarketInfosAsyncReturns a paginated list of full market objects, optionally filtered by status, sport, competition, or event.
GetMarketInfosWithCountAsyncSame as GetMarketInfosAsync but includes a total-count field for pagination UI.
GetMarketInfosAsync<T>Generic variant — supply your own response model to project only the fields you need.
GetMarketInfosWithCountAsync<T>Generic variant with total count.
GetShortMarketInfosAsyncLightweight fetch by market ID list — returns only ID, status, and title.
GetShortMarketInfosWithLimitAsyncSame as above but applies a server-side result limit.
GetShortMarketInfosWithCountAsyncShort market info plus total count.
GetShortMarketInfosWithCountWithLimitAsyncShort market info with total count and server-side limit.
GetSportAndCompetitionsAsyncReturns the full sports and competitions catalog.

IMarketService — STXEventService

MethodDescription
GetEventInfosAsyncReturns events with their attached markets, filtered by sport, competition, status, or date range.

IOrderService — STXOrderService

MethodDescription
ConfirmOrderAsyncPlaces a single order with price, quantity, market, action, and type.
ConfirmOrdersAsyncPlaces multiple orders in one request.
CancelOrderAsyncCancels a single order by ID.
CancelOrdersAsyncCancels a batch of orders by ID list.
CancelAllOrdersAsyncCancels every open order for the authenticated user.
GetMyOrdersAsyncRetrieves order history with optional status, market, pagination, and sort filters.

ITradeService — STXTradeService

MethodDescription
GetMyTradesAsyncReturns fill history with optional market, pagination, and sort filters.
GetMyTradesForOrderAsyncReturns all fills associated with a specific order ID.

ISettlementService — STXSettlementService

MethodDescription
GetMySettlementsAsyncReturns settlement history with optional filters for type, market, date range, and pagination.

IProfileService — STXProfileService

MethodDescription
GetProfileAsyncReturns the authenticated user’s profile, identifiers, jurisdiction, and loyalty tier.

All services at a glance

ServicePurposeLifetime
STXLoginServiceHigh-level login, dispatches 2FA and T&C checksTransient
STXTokenServiceLow-level login, Confirm2FAAsync, RefreshTokenAsyncTransient
STXSessionBackgroundServiceAuto-refreshes JWT in the backgroundSingleton (hosted)
STXProfileServiceGetProfileAsyncTransient
STXTermsAndConditionsServiceGet, check, and accept terms and conditionsTransient
STXMarketServiceMarket catalog with filtering and paginationTransient
STXEventServiceEvents with attached marketsTransient
STXOrderServicePlace, cancel, and query ordersTransient
STXTradeServiceFill historyTransient
STXSettlementServiceSettlement historyTransient
STXGeoLocationServiceCurrent geo tokenTransient
STXGeoLocationBackgroundServiceKeeps the geo token freshSingleton (hosted)
STXGeoFencingLicenseServiceGeoComply licenseTransient

Real-time channels at a glance

The SDK ships a set of WebSocket channels for streaming updates. Subscribe to these instead of polling when you need low-latency state changes.
ChannelTopicPayload
STXPortfolioChannelportfolio:{user_id}Balance, escrow, and P&L summary
STXActiveOrdersChannelactive_orders:{user_id}Order state transitions
STXActiveTradesChannelactive_trades:{user_id}New fills
STXActiveSettlementsChannelWrapperactive_settlements:{user_id}Settlement events
STXPositionsChannelactive_positions:{user_id}Position changes
STXUserInfoChanneluser_info:{user_id}Profile and account changes
STXMarketChannelmarkets, market_info, market_updatesPrices and market state