Install STX.Sdk, authenticate, and make your first call in under five minutes.
Shortest path from zero to a working GraphQL call against SportsX staging.
Use staging for anything you’re building. Pointing a new integration at production trades with real balances — exercise your code path on staging first.
export STX_EMAIL="you@example.com"export STX_PASSWORD="your-password"dotnet run
You should see something like:
Got 217 markets mkt_8f3... open Who wins Game 4 of the NBA Finals? mkt_a12... open LAL @ BOS moneyline ...
If you see a STXWrongCredentialsException, your email/password is off. If you see a HttpRequestException, the endpoint URL is wrong or the host isn’t reachable from your network.
4
Place your first order
After the market fetch, pick a market and place a tiny limit order:
using STX.Sdk.Enums;var orderService = host.Services.GetRequiredService<STXOrderService>();var targetMarket = resp.MarketInfos.First(m => m.Status == STXMarketStatus.open);var order = await orderService.ConfirmOrderAsync( price: 10, // cents quantity: 1, marketId: targetMarket.MarketId, action: STXOrderAction.buy, orderType: STXOrderType.limit, cancelOnDisconnect: false); // true requires the active orders channel joinedConsole.WriteLine($"Placed order {order.Id} at {order.Price}c × {order.Quantity}");await orderService.CancelOrderAsync(order.Id);Console.WriteLine($"Cancelled {order.Id}");
Run again — the program should print the placed + cancelled order IDs.