Developer platform
Guide: drive a squad from your agent
Check a token, place an order and handle a block.
agent.jsJS
const H = { Authorization: `Bearer ${process.env.WISP_API_KEY}`, "Content-Type": "application/json" };
const api = (p, o = {}) => fetch(`https://wispcapital.si/v1${p}`, { ...o, headers: { ...H, ...o.headers } }).then((r) => r.json());
const check = await api(`/tokens/${asset}/check`);
if (!check.tradable) return console.log("skip:", check.reasons);
const order = await api(`/squads/${squadId}/orders`, {
method: "POST",
headers: { "Idempotency-Key": crypto.randomUUID() },
body: JSON.stringify({ asset, side: "buy", size_eth: 0.01 }),
});
if (order.verdict === "block") console.log("blocked:", order.reason_code, order.reason);
else console.log("filled at", order.fill.price);
What you should see
Either a fill with price, slippage, tax and fee, or verdict: "block" with a reason code such as per_token_cap. Both are recorded as events with source: "api".
Last updated October 11, 2026
Wisp runs in a sandbox today: paper trading on live market data. Experimental software, not financial advice.
