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 account services cover everything related to a user’s identity, financial history, and legal agreements. STXProfileService gives you the authenticated user’s profile, STXSettlementService lets you page through resolved positions, and STXTermsAndConditionsService handles fetching, checking, and accepting the current T&Cs. All three services are registered as transient. For task-oriented examples, see the Authentication guide.
GetProfileAsync
Returns the full profile for the currently authenticated user, including identifiers, contact details, jurisdiction, and loyalty tier.
Return type: Task<STXUserProfile>
Parameters
This method takes no parameters.
Example
STXUserProfile profile = await _profileService.GetProfileAsync();
Console.WriteLine($"Logged in as {profile.FirstName} {profile.LastName}");
Console.WriteLine($"User ID: {profile.UserId}");
Console.WriteLine($"Jurisdiction: {profile.JurisdictionCode}");
Console.WriteLine($"2FA enabled: {profile.Is2FAEnabled}");
STXUserProfile — key fields
| Field | Description |
|---|
UserId | Numeric user identifier — used as the {user_id} segment in WebSocket channel topics |
UserUid | UUID-format user identifier |
SessionId | Current session identifier |
Email | Registered email address |
FirstName, LastName | Profile name fields |
Is2FAEnabled | true when the account has two-factor authentication enabled |
Is2FAPerDeviceEnabled | true when 2FA is enforced per device |
JurisdictionCode | Regulatory jurisdiction code, e.g. "NJ" |
LoyaltyTier | Fee schedule tier for the account |
CurrentLoginAt | Timestamp of the current session login |
LastLoginAt | Timestamp of the previous session login |
GetMySettlementsAsync
Returns paginated settlement history for the authenticated user. All parameters are optional — omit them to retrieve the default page of recent settlements.
Return type: Task<STXMySettlementHistory>
Parameters
| Name | Type | Required | Description |
|---|
limit | int? | No | Maximum number of settlements to return. |
offset | int? | No | Number of settlements to skip, for pagination. |
sortBy | STXSortOrder? | No | Sort order for results — asc or desc. |
settlementType | STXSettlementType? | No | Filter by settlement outcome: win, loss, push, refund, and others. |
tradeSettlementType | STXTradeSettlementType? | No | Filter by trade-level settlement type: won, lost, pushed, and others. |
marketIds | IEnumerable<string> | No | Limit results to settlements on these markets. |
from | DateTime? | No | Start of the settlement date range (inclusive). |
to | DateTime? | No | End of the settlement date range (inclusive). |
Example
STXMySettlementHistory history = await _settlementService.GetMySettlementsAsync(
settlementType: STXSettlementType.win,
from: DateTime.UtcNow.AddDays(-30),
to: DateTime.UtcNow,
limit: 50,
offset: 0);
foreach (var settlement in history.Settlements)
{
Console.WriteLine(
$"Settlement {settlement.SettlementId}: {settlement.Type} — ${settlement.Amount / 100.0:F2}");
}
STXSettlement — key fields
| Field | Description |
|---|
SettlementId | Unique settlement identifier |
TradeId | ID of the fill that generated this settlement |
OrderId | ID of the originating order |
MarketId | ID of the settled market |
Type | Settlement outcome — win, loss, push, etc. |
Amount | Settlement amount in cents |
SettledAt | UTC timestamp when the settlement was recorded |
Enums
| Enum | Values |
|---|
STXSettlementType | win, loss, push, refund, and others |
STXTradeSettlementType | won, lost, pushed, and others |
CheckTermsAndConditionsAsync
Checks whether the authenticated user has any pending terms-and-conditions acceptance. Returns true when nothing is pending (the user is clear to trade), or false when they need to accept a new version.
Return type: Task<bool>
Parameters
This method takes no parameters.
Example
bool isClear = await _tncService.CheckTermsAndConditionsAsync();
if (!isClear)
{
STXTermsAndConditions current = await _tncService.GetTermsAndConditionsAsync();
Console.WriteLine($"User must accept T&Cs version {current.Version}");
}
AcceptTermsAndConditionsAsync
Records the user’s acceptance of a specific T&C version. Returns true on success.
Return type: Task<bool>
Parameters
| Name | Type | Required | Description |
|---|
version | string | Yes | The version string of the terms to accept, as returned by GetTermsAndConditionsAsync. |
Example
STXTermsAndConditions current = await _tncService.GetTermsAndConditionsAsync();
bool accepted = await _tncService.AcceptTermsAndConditionsAsync(current.Version);
if (accepted)
{
Console.WriteLine("Terms accepted — user may now trade.");
}
GetTermsAndConditionsAsync
Returns the currently active terms-and-conditions document, including its version identifier and content.
Return type: Task<STXTermsAndConditions>
Parameters
This method takes no parameters.
Example
STXTermsAndConditions tnc = await _tncService.GetTermsAndConditionsAsync();
Console.WriteLine($"Current T&C version: {tnc.Version}");
Pass checkTermsAndConditions: true to STXLoginService.LoginAsync to check for pending T&Cs as part of the login flow. When a new version is pending, the response sets PromptTncAcceptance: true so you can surface the acceptance prompt immediately after login.