Overview
The Limitless Exchange TypeScript SDK provides a type-safe client for interacting with both CLOB and NegRisk prediction markets. It handles authentication, EIP-712 order signing, market data fetching, portfolio tracking, and real-time WebSocket streaming out of the box.Source code and issue tracker are available on GitHub.
Installation
- npm
- yarn
- pnpm
Quick Start
Configure environment variables
Create a The SDK automatically reads
.env file in your project root (and add it to .gitignore):LIMITLESS_API_KEY from the environment if no apiKey is passed to the constructor.Environment Variables
| Variable | Required | Description |
|---|---|---|
LIMITLESS_API_KEY | For authenticated endpoints | Auto-loaded by the SDK. Generate at limitless.exchange under profile menu. |
PRIVATE_KEY | For order signing | Ethereum private key used for EIP-712 order signatures. Never commit to version control. |
HttpClient Constructor
TheHttpClient accepts the following options:
| Option | Type | Default | Description |
|---|---|---|---|
baseURL | string | — | API base URL |
apiKey | string | process.env.LIMITLESS_API_KEY | API key for authentication |
timeout | number | 30000 | Request timeout in milliseconds |
additionalHeaders | Record<string, string> | {} | Additional headers sent with every request |
What You Can Build
Markets
Discover markets, fetch orderbooks, and query NegRisk groups.
Trading and Orders
Create GTC and FOK orders, manage approvals, and cancel orders.
Portfolio and Positions
Track CLOB and AMM positions, PnL, and trade history.
WebSocket Streaming
Real-time orderbook, price, position, and transaction events.