web/src/lib/api-client
.tsimport { OxinsiderApiClient } from "@/lib/api-client";
const client = new OxinsiderApiClient({
baseUrl: "https://0xinsider.com",
apiKey: process.env.OXI_API_KEY,
});
await client.batchGetTraders([…]);
const client = new OxinsiderApiClient({
baseUrl: "https://0xinsider.com",
apiKey: process.env.OXI_API_KEY,
});
await client.batchGetTraders([…]);
Drift-tested vs OpenAPI · bearer auth · v1 error envelopes
A drift-tested TypeScript client lives at `web/src/lib/api-client/`. It handles bearer auth, path params, repeated query params, JSON bodies, and v1 error envelopes, and is checked against the OpenAPI spec on every push. It is not a published npm package yet — copy or import the source directly. Setup at docs.0xinsider.com/changelog.