This guide describes version 2 of STX.Sdk.
STX.Sdk is the .NET SDK for the STX exchange. Read markets, place and cancel orders, follow your account, and stream the WebSocket channels, with every request signed by your API key and every response typed. Response fields are described in the API reference. It targets .NET 10.
dotnet add package STX.Sdkusing STX.Sdk;
// Reads your API key and exchange from STX_* environment variables or ~/.stx/credentials.using var client = new STXClient();
var me = await client.GetMeAsync();var page = await client.GetMarketsAsync(status: ["open"], limit: 5);Console.WriteLine($"{me.UserId} {string.Join(", ", page.Select(m => m.Symbol))}");// bc2d4b34-5d21-4a2a-8af6-d1ad3846ac3f STXNCAAF-26OCT212000NMSUSHSU-GAMESHSU, STXNBA-26OCT212200PHXPOR-GAMEPOR, ...Authentication shows how to give the client your API key, and Environments lists the exchanges and where to get a key. What you can do maps every feature to its SDK calls and shows which exchange has which.
Prices and quantities are strings
Section titled “Prices and quantities are strings”Amounts come back as decimal strings, exactly as the API sends them (order.Price == "0.0100"), and orders take strings too: price: "0.58", quantity: "100". Parse with decimal.Parse(value, CultureInfo.InvariantCulture) when you need arithmetic, never double.
Response models are generated from the REST specification. Properties are PascalCase (order.ClientOrderId) and every one is nullable; fields the SDK does not know yet are kept in AdditionalProperties.
Where to go next
Section titled “Where to go next”Released under the MIT license.

