TaifoonTAIFOON
SIGN IN
SDK

TypeScript SDK

Browser- and Node-compatible. Uses native fetch. Zero runtime dependencies; ships with full type definitions.
Note
@taifoon/clob is not published yet (planned for Phase A.2). Today, call the CLOB endpoints with fetch; the shapes below are the ones the client will wrap.

Install

# PLANNED (Phase A.2): not on npm yet
npm i @taifoon/clob

Place an order

// PLANNED client: not on npm yet
import { Client } from "@taifoon/clob";

const c = new Client({
  baseUrl: "https://api.taifoon.dev",
  attribution: "bot-demo",
});

const order = await c.placeOrder({
  market: "BTC-PERP",
  side: "buy",
  qty: "0.01",
  price: "75000",
  tif: "gtc",
});
console.log(order.order_id);

Mint a warp session

const s = await c.mintSession({
  from: "2026-05-15T00:00:00Z",
  to:   "2026-05-15T04:00:00Z",
  markets: ["BTC-PERP"],
  speedX: 100,
});

while (!(await s.done())) {
  const candles = await s.candles("BTC-PERP", { tf: "1m", limit: 200 });
  const decision = myStrategy(candles);
  if (decision) await s.placeOrder(decision);
  await s.step();
}

const receipt = await s.receipt();
if (!receipt.causality_ok) throw new Error("causality broken");