Moving from 1.x
STX.Sdk 2.0 is a new SDK over the REST API and the WebSocket channels, authenticated with an API key. Nothing from 1.x carries across unchanged, so plan the move as a rewrite of the code that talks to the exchange. 1.x stays installable; to stay on it, pin the range: <PackageReference Include="STX.Sdk" Version="[1.6.2,2.0)" />.
| 1.x | 2.0 |
|---|---|
| Email and password login, sessions, token refresh | An API key: every request is signed. See Authentication |
ConfigureSTXServices() and services resolved from DI |
One STXClient per exchange; register it as a singleton if you use DI |
STXMarketService, STXOrderService, STXTradeService, STXSettlementService |
Methods on STXClient: GetMarketsAsync, PlaceOrderAsync, GetFillsAsync, GetSettlementsAsync |
| Channel classes and channel wrappers, one socket each | One STXWebSocket for every channel; OrdersAsync, FillsAsync, PositionsAsync, BalancesAsync, AccountViewAsync |
decimal and double amounts, enums |
Decimal strings exactly as the API sends them; statuses and actions as strings |
STXEnvironment.OntarioDemo and friends |
Region and Environment options, or a credentials profile. See Environments |
| .NET 8 and .NET 10 | .NET 10 |
Cancel-on-disconnect works as before: arm it on the orders channel and opt each order in. See Cancel-on-disconnect.
Response models are generated from the REST API reference, so their fields follow the API: market.MarketId, order.ClientOrderId, position.NetPosition.

