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 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

FieldDescription
UserIdNumeric user identifier — used as the {user_id} segment in WebSocket channel topics
UserUidUUID-format user identifier
SessionIdCurrent session identifier
EmailRegistered email address
FirstName, LastNameProfile name fields
Is2FAEnabledtrue when the account has two-factor authentication enabled
Is2FAPerDeviceEnabledtrue when 2FA is enforced per device
JurisdictionCodeRegulatory jurisdiction code, e.g. "NJ"
LoyaltyTierFee schedule tier for the account
CurrentLoginAtTimestamp of the current session login
LastLoginAtTimestamp 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

NameTypeRequiredDescription
limitint?NoMaximum number of settlements to return.
offsetint?NoNumber of settlements to skip, for pagination.
sortBySTXSortOrder?NoSort order for results — asc or desc.
settlementTypeSTXSettlementType?NoFilter by settlement outcome: win, loss, push, refund, and others.
tradeSettlementTypeSTXTradeSettlementType?NoFilter by trade-level settlement type: won, lost, pushed, and others.
marketIdsIEnumerable<string>NoLimit results to settlements on these markets.
fromDateTime?NoStart of the settlement date range (inclusive).
toDateTime?NoEnd 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

FieldDescription
SettlementIdUnique settlement identifier
TradeIdID of the fill that generated this settlement
OrderIdID of the originating order
MarketIdID of the settled market
TypeSettlement outcome — win, loss, push, etc.
AmountSettlement amount in cents
SettledAtUTC timestamp when the settlement was recorded

Enums

EnumValues
STXSettlementTypewin, loss, push, refund, and others
STXTradeSettlementTypewon, 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

NameTypeRequiredDescription
versionstringYesThe 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.