STXIdentityService
Section titled “STXIdentityService”public class STXIdentityService{ Task<STXIdentity> GetMeAsync();}Returns the identity behind the current credentials. Call it once after startup when authenticating with an API key: there is no login response to read the user id from, and the WebSocket channels need it to build their topic.
STXIdentity
Section titled “STXIdentity”UserId, AccountId |
Identifiers. UserId is what channel topics are keyed on |
FirstName, LastName |
Display name |
KeyId |
The API key that authenticated the call, when using API-key auth |
Method |
How the caller authenticated |
Scope |
The key’s scope, read_only or read_write |
STXSettlementService
Section titled “STXSettlementService”public class STXSettlementService{ Task<STXMySettlementHistory> GetMySettlementsAsync( IEnumerable<STXSettlementType> settlementTypes, STXRollingWindowIncrement rollingWindowIncrement = STXRollingWindowIncrement.DAYS, int rollingWindowValue = 1, int page = 1, int pageSize = 100);}settlementTypes is required. The rolling window bounds how far back to look: rollingWindowIncrement and rollingWindowValue together mean “the last N days”, “the last N weeks”, and so on.
| Enum | Values |
|---|---|
STXSettlementType |
CLOSED_LONG, CLOSED_SHORT, EXPIRED_LONG, EXPIRED_SHORT |
STXTradeSettlementType |
SETTLED, UNSETTLED |
STXRollingWindowIncrement |
SECONDS, MINUTES, HOURS, DAYS, MONTHS |
A settlement describes how a position closed, not whether it won: CLOSED_* means the position was closed by an opposing trade, EXPIRED_* that it ran to market expiry.
STXTermsAndConditionsService
Section titled “STXTermsAndConditionsService”public class STXTermsAndConditionsService{ // NOT read-only. If the current terms are in effect, accepts them on the // user's behalf and returns the result of that acceptance. Task<bool> CheckTermsAndConditionsAsync();
// Accept a version. Omit it to accept the one currently in effect. Task<bool> AcceptTermsAndConditionsAsync(string version = null);
// Read-only. Fetches the current terms without accepting anything. Task<STXTermsAndConditions> GetTermsAndConditionsAsync();}Task-oriented examples: Authentication.

