Skip to content
UNHEDGED / DOCS

Search documentation

Browse docs or start typing to find a topic

↑ ↓ to navigate Enter to open Esc to close

Documentation

Back to app

TypeScript SDK

@unhedged/typescript-sdk is a TypeScript client for market data, account reads, order-book trading, and WebSocket feeds.

Requires Node.js 20+ and ESM.

Pass apiKey to UnhedgedClient for protected calls. The API defaults to https://api.unhedged.gg; a custom baseUrl must omit /api/v1. Create a key under Account → API Keys with the required scopes.

Full SDK documentation on npm, including authentication, order handling, streaming, and runnable examples.

Run the SDK example

Save as markets.mjs and run node markets.mjs. No API key is needed; TypeScript uses the same imports.

Install
npm install @unhedged/typescript-sdk
markets.mjs
import { UnhedgedClient } from '@unhedged/typescript-sdk';

const client = new UnhedgedClient();
const { markets } = await client.markets.list({
  status: ['ACTIVE'], includeGrouped: true, limit: 5,
});
console.log(markets);