Build on Sugar Rush
Sugar Rush is an on-chain central limit order book on Gummiworm, a Cardano L2.
The API is a single WebSocket endpoint. Market data, account state, and order
submission all go over that one connection. The @sugar-rush/sdk package wraps
the protocol for TypeScript.
The SDK keeps subscribed state in memory. You can react to events as they arrive, or read the current state synchronously. Every example on this site has an SDK view and a Raw WS view; use Raw WS to see the wire messages, for example when porting from another exchange.
To authenticate, the client needs an Identity: a key that signs requests. You can use a throwaway key, a seed phrase, or a browser wallet. The examples on this site use whichever you select here:
import { createClient, ephemeralKey } from "@sugar-rush/sdk";// A throwaway key, generated in the browser. Persist it to keep the same// account next time. Testnet only; do not reuse it on mainnet.const identity = await ephemeralKey(localStorage.getItem("sr-key") ?? undefined);localStorage.setItem("sr-key", identity.export());const client = createClient({ wsUrl: "wss://api.sugar.rush.preview.sundae.fi/ws", identity });await client.connect();await client.createOrder({symbol: "DARK-VAN", side: "buy", type: "limit",price: "2.15", size: "1000", timeInForce: "GTC",});
Where to go
- Your first trade — create a testnet account, fund it, and place an order.
- Guides — market data, orders, deposits and withdrawals.
- API reference — the AsyncAPI contract.
Everything on this site runs on the Cardano Preview testnet. Keys generated here are throwaways; do not reuse them on mainnet.