GuidesBuild schemas by venue
SX Bet
Step zero — from nothing to your first trade
Section titled “Step zero — from nothing to your first trade”SX Bet is client-side only: your key and API key go to sx.bet directly and never transit Predictefy, so the last step here is the venue-direct SDK rather than a hosted lane.
- Register the trading wallet with sx.bet. Start at sx.bet. A key-only wallet
is not enough — an unregistered wallet is rejected with
INSUFFICIENT_KYCeven when its signature is perfectly valid. - Enable betting for each token and network you intend to trade.
- Deploy and pre-fund the account proxy wallet. V3 will not accept a resting order without it. This catches people out: the wallet can be registered and still be refused at this step.
- Generate an API key for the registered trading account. V3 requires it on every trading and cancellation request, not just at sign-in.
- Fund the proxy. Six-decimal SX Network USDC. SX Network is not on LI.FI, so funding routes
through Glide —
POST /v1/bridge/session, thenclient.accounts.sxbet.depositToProxymoves funds from the EOA into the proxy. The V3 minimum order size is 5 USDC. - Trade venue-direct. Use
client.accounts.sxbet. There is no hosted lane: every/v1/exec/sxbet/…route answers404 VENUE_NOT_SUPPORTED, and SX Bet never appears inGET /v1/exec/venues.
What you need first
Section titled “What you need first”- Production status: Client-side only. There is no hosted SX Bet execution lane, so
GET /v1/exec/venuesnever lists it and every/v1/exec/sxbet/…route answers404 VENUE_NOT_SUPPORTED. The venue-direct SDK integration atclient.accounts.sxbethas been live since 2026-07-27. - Wallet and chain: An EVM wallet on SX Network (chain
4162). The private key stays in your process and signs every order locally; V3 cancellation uses the caller’s API key instead. - Venue account: Yes, and the preconditions are hard. The trading wallet must have a
registered sx.bet account — a key-only wallet is rejected with
INSUFFICIENT_KYCeven when its signature is correct. V3 also requires the account’s proxy wallet to be deployed and pre-funded before the venue accepts an order. The retired V2TokenTransferProxyapproval is not a V3 precondition. - Credentials: The wallet private key and an SX Bet API key. V3 requires the API key on every trading and cancellation request. Both stay in your process and go only to sx.bet; neither transits Predictefy.
- Funding: Six-decimal SX Network USDC in the account proxy. SX Network is not on LI.FI, so the
funding lane routes through Glide:
POST /v1/bridge/session; thenclient.accounts.sxbet.depositToProxymoves funds from the EOA into the proxy. V3’s minimum order size is 5 USDC (liveorderSizeMinimum, obv3 metadata).
The client-side write surface
Section titled “The client-side write surface”import Predictefy from '@predictefy/sdk';
const client = new Predictefy({ apiKey: process.env.PREDICTEFY_API_KEY, venueCredentials: { sxbet: { privateKey: process.env.SXBET_WALLET_KEY!, apiKey: process.env.SXBET_API_KEY, // required on V3; optional on V2 }, },});- Limit and market orders: Both sign one EIP-712 order and post to
POST /orders-v3. A limit order usesGTC; a market order usesIOC, wherepercentageOddsis the worst accepted price. - Cancellation:
cancelOrder/cancelOrders,cancelOrdersByEvent, andcancelAllOrdersuse API-key-authenticatedDELETE /orders-v3,/orders-v3/event, and/orders-v3/all. By-id cancellation reports its outcome synchronously. Event/all acknowledge asynchronous batches, and the SDK drains them whilehasMoreremains true. - Proxy funding:
client.accounts.sxbet.depositToProxybuilds, signs, and submits the V3 transfer permit.client.funding.buildPermitRequestandPOST /orders/approveare V2-only and refuse under V3. - Dead-man switch:
armHeartbeatanddisarmHeartbeatuse/heartbeat/v3. The samex-sx-api-keycredential is mandatory for V3 trading.
The V3 API cutover
Section titled “The V3 API cutover”SX Bet retired its V2 order-book and trading API on 2026-08-26 14:00 UTC. The SDK ships both
implementations and defaults to v3.
Select a version with the SXBET_API_VERSION environment variable (v2 or v3), or pin one
explicitly through SxbetAccountClient’s apiVersion option. SXBET_API_VERSION=v2 is the only
way back and works only against a V2 sandbox.
Three V3 differences remain load-bearing, and each one is a hard rejection rather than a soft fallback:
- Routes move. Order create, cancel, cancel-by-event, cancel-all, metadata, and heartbeat all
move to their
-v3paths. - The API-key header is renamed. V3 reads
x-sx-api-keyand rejects the V2 spelling. - An API key becomes mandatory for trading. V2 order placement was signature-only; V3 requires the key as well.
Disarming the heartbeat also changes shape: V2 has a separate cancel route, while V3 disarms by
posting timeoutSeconds: 0 to the same heartbeat route. The SDK handles that difference for you.
Venue properties, not gaps
Section titled “Venue properties, not gaps”- No hosted lane, no hosted relay. This client-side integration does not imply hosted execution or unlisted verb coverage. Signing keys and venue credentials never leave your process.
- No withdrawal route. SX Bet publishes none, so
withdrawFromProxy()throwsNOT_SUPPORTEDby design. Withdrawals and proxy-to-proxy transfers are Safe-authorised in the sx.bet app, and this lane will not emulate a route the venue does not offer. See Accounts & funding. - Order books. SX Bet has a real CLOB. An earlier Railway-egress incident that returned honest
empty books healed on 2026-08-15; production
fetchOrderBookreturned real two-sided depth. That healing changed book availability only — the execution boundary above is unchanged.
Venue and jurisdiction eligibility remain the operator’s and integrator’s compliance responsibility.