The SDK · zero dependencies · no key
Build on Sounder.
Everything the card does, from your own app: the best route the chain accepts, measured through our contract; the floor it enforces; limit orders anyone can execute; and the burn on every fill, whichever front end asked. One file, no dependencies, no key. It hands you { to, data } and you sign it however you sign things.
01
Twenty lines
A buy, measured and signed, from any wallet library.
import { sounder } from 'https://www.sounderliq.app/sdk.mjs'
const s = sounder()
// 350 USDG of NVDA: the best route the chain accepts, measured through our contract
const r = await s.route({ ticker: 'NVDA', pay: 'USDG', amount: 350 })
console.log(r.simulation.chainOut, r.executorFloor, r.saved?.headlineUsd)
// once per wallet: the three approvals
for (const a of s.approvals(r)) await wallet.sendTransaction(a)
// the fill: the floor is enforced on chain, the burn happens inside the same tx
await wallet.sendTransaction(s.fill(r))wallet.sendTransaction stands for whatever you use — viem, ethers, a raw JSON-RPC call. Every call the SDK returns is a plain { to, data } on chain 4663.
02
Limit orders
Leave one, list the book, execute the ones the chain would fill.
// leave an order: 1,000 USDG for at least 4.6 NVDA, good for a week
const burn = (await s.peg()).quantity // SOUNDER escrowed with the order
for (const a of s.orders.approvals(USDG, BigInt(burn * 1e18))) await wallet.sendTransaction(a)
await wallet.sendTransaction(s.orders.place({
tokenIn: USDG, amountIn: 1_000_000_000n, tokenOut: NVDA, floor: 4_600_000_000_000_000_000n,
expiry: Math.floor(Date.now() / 1000) + 7 * 86400,
}))
// the book, every open order tried against the chain right now
const { orders } = await s.orders.list()
for (const o of orders.filter((x) => x.fillable))
await wallet.sendTransaction(s.orders.fill(o.id, o.routerCalldata)) // anyone may; the owner gets the output03
For agents
Sounder is an MCP server. Point any agent at one URL and it reads the chain the way people do.
// Claude Desktop, Cursor, ChatGPT, or any MCP client: add a remote server at
https://www.sounderliq.app/api/mcp
// tools it exposes
sound { ticker, size } the best fill at a size, the ladder, spread, capacity, block
compare { tickers[], size } up to eight names ranked by cost
walls { size } who takes $1k, $10k, $100k, $1M and who cannot
holdings { address } every position sold whole in simulation
route { ticker, size, pay } the buy, measured, with the executor transaction and its floor
sell { ticker, amount, quote } the sell, the same way
orders {} the open limit orders and whether the chain can fill them
tickers {} every name on the chainNothing in it signs. The route and sell tools return the transaction and its one-time approvals for the agent's own wallet, with the floor the contract will enforce, so an agent that trades through Sounder gets the same protection a person does and the same burn on every fill.
04
What it wraps
Every method is one of the site's own endpoints, unchanged.
| Method | What it returns |
|---|---|
sound(ticker, sizes?) | every pool that quotes a ticker, walked at the sizes you ask |
route({ ticker, pay, amount }) | the best buy the chain accepts, written and measured; hops when there is no direct pool |
sell({ ticker, amount, quote }) | the best sell, the same way |
fill(route) | the executor call at 0xA9385698EB94dDc3578C00686E38A90095F7a552 |
approvals(route) | the three approvals a fill needs, once |
orders.list / place / fill / cancel | the orders contract at 0x4CF73434058FdBd27a96477B4378FDcFFef3f2bB |
depth() | the whole chain at four sizes |
peg() | the burn, its drift, and every re-peg |
Types ship beside it at https://www.sounderliq.app/sdk.d.ts. Pass quiet: true to route or sell and the order goes in a request body with nothing cached. CORS is on for every endpoint.