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
| Method | Description |
|---|---|
LoginAsync | Authenticates with email and password, optionally starts session keep-alive and checks pending T&Cs. |
IAuthService — STXTokenService
| Method | Description |
|---|---|
LoginAsync | Low-level login — use directly when you need fine-grained control over the login/2FA/T&C flow. |
Confirm2FAAsync | Completes a two-factor authentication challenge using the OTP code and the SessionId from the initial login response. |
RefreshTokenAsync | Exchanges the stored refresh token for a fresh JWT. Throws STXSessionExpiredException when both tokens have expired. |
IMarketService — STXMarketService
| Method | Description |
|---|---|
GetMarketInfosAsync | Returns a paginated list of full market objects, optionally filtered by status, sport, competition, or event. |
GetMarketInfosWithCountAsync | Same 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. |
GetShortMarketInfosAsync | Lightweight fetch by market ID list — returns only ID, status, and title. |
GetShortMarketInfosWithLimitAsync | Same as above but applies a server-side result limit. |
GetShortMarketInfosWithCountAsync | Short market info plus total count. |
GetShortMarketInfosWithCountWithLimitAsync | Short market info with total count and server-side limit. |
GetSportAndCompetitionsAsync | Returns the full sports and competitions catalog. |
IMarketService — STXEventService
| Method | Description |
|---|---|
GetEventInfosAsync | Returns events with their attached markets, filtered by sport, competition, status, or date range. |
IOrderService — STXOrderService
| Method | Description |
|---|---|
ConfirmOrderAsync | Places a single order with price, quantity, market, action, and type. |
ConfirmOrdersAsync | Places multiple orders in one request. |
CancelOrderAsync | Cancels a single order by ID. |
CancelOrdersAsync | Cancels a batch of orders by ID list. |
CancelAllOrdersAsync | Cancels every open order for the authenticated user. |
GetMyOrdersAsync | Retrieves order history with optional status, market, pagination, and sort filters. |
ITradeService — STXTradeService
| Method | Description |
|---|---|
GetMyTradesAsync | Returns fill history with optional market, pagination, and sort filters. |
GetMyTradesForOrderAsync | Returns all fills associated with a specific order ID. |
ISettlementService — STXSettlementService
| Method | Description |
|---|---|
GetMySettlementsAsync | Returns settlement history with optional filters for type, market, date range, and pagination. |
IProfileService — STXProfileService
| Method | Description |
|---|---|
GetProfileAsync | Returns the authenticated user’s profile, identifiers, jurisdiction, and loyalty tier. |
All services at a glance
| Service | Purpose | Lifetime |
|---|---|---|
STXLoginService | High-level login, dispatches 2FA and T&C checks | Transient |
STXTokenService | Low-level login, Confirm2FAAsync, RefreshTokenAsync | Transient |
STXSessionBackgroundService | Auto-refreshes JWT in the background | Singleton (hosted) |
STXProfileService | GetProfileAsync | Transient |
STXTermsAndConditionsService | Get, check, and accept terms and conditions | Transient |
STXMarketService | Market catalog with filtering and pagination | Transient |
STXEventService | Events with attached markets | Transient |
STXOrderService | Place, cancel, and query orders | Transient |
STXTradeService | Fill history | Transient |
STXSettlementService | Settlement history | Transient |
STXGeoLocationService | Current geo token | Transient |
STXGeoLocationBackgroundService | Keeps the geo token fresh | Singleton (hosted) |
STXGeoFencingLicenseService | GeoComply license | Transient |
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.| Channel | Topic | Payload |
|---|---|---|
STXPortfolioChannel | portfolio:{user_id} | Balance, escrow, and P&L summary |
STXActiveOrdersChannel | active_orders:{user_id} | Order state transitions |
STXActiveTradesChannel | active_trades:{user_id} | New fills |
STXActiveSettlementsChannelWrapper | active_settlements:{user_id} | Settlement events |
STXPositionsChannel | active_positions:{user_id} | Position changes |
STXUserInfoChannel | user_info:{user_id} | Profile and account changes |
STXMarketChannel | markets, market_info, market_updates | Prices and market state |