@limitless-exchange/sdk, defaults to dry-run, and ships a preflight that tells you why an order would be rejected before you send one.
This is for individual traders, builders, and AI agents who want a working code template, not a partner integration. If you’re building a platform where other users trade through your product, see Programmatic API instead. If you want an assistant to trade with you approving each order in a chat, see the MCP server.
What’s included
A small TypeScript project. Everything Limitless goes through the SDK; the repo adds the strategy loop, the safety rails, and a few helpers the SDK doesn’t ship.Unattended agents are bound by the same conduct rules as any trader. Before going live, read Building Responsible Trading Agents: what is prohibited, which safeguards the exchange enforces, and which ones (spending limits, kill switches, self-trade handling) your bot has to enforce itself.
Five-minute setup
.env:
PRIVATE_KEY: the dedicated wallet’s key.LMTS_TOKEN_IDandLMTS_TOKEN_SECRET: a scoped HMAC token. On limitless.exchange, connect the same wallet, open the API token modal, pick the API Tokens tab, and derive one. See Authentication.
Preflight
doctor checks that the key is well-formed, the token authenticates, the token’s account matches the signing wallet, the trading-wallet mode is eoa, and the wallet is funded. It exits non-zero on anything that would make orders fail and never prints a secret. Run it after every credential change.
Run a strategy
Every strategy starts withDRY_RUN=true: each order intent is logged, nothing is signed or sent.
npm start approve <slug>). Neg-risk (grouped) markets use a separate exchange and adapter and need their own approval.
Keep order sizes small for the first live runs (2 per order). The strategies are conservative by default, but no bot is bug-free.
Built-in strategies
template: scans the newest CLOB markets, compares each price to a placeholder fair value, and buys when the gap clears a threshold. The placeholder returns the market’s own price, so it trades nothing until you replace it with your signal. Copy this one.certainty-closer: buys near-resolution favourites sized by fractional Kelly. SDK-only, no external feeds. On its own it has no independent edge; the edge is the one you assert in its config. The cleanest example of the filter → decide → execute loop.oracle-arb: streams Pyth prices over Hermes SSE and fires FOK orders on short-dated crypto markets when the implied probability strays from the oracle by more than fees and slippage.cross-market-mm: quotes on Limitless and hedges fills on Polymarket to stay delta-neutral. It has its own guide: Cross-market market making.
Bring your own strategy
Copysrc/strategies/template/, rename it, and implement four methods on BaseStrategy:
tick() returns decisions; the base class places them through the SDK, logs the result, and keeps the loop alive if a tick throws. Add a run.ts next to it (copy the template’s) and an entry in package.json scripts.
Under the hood
Orders are signed with EIP-712 by the SDK, which picks the venue’sverifyingContract (default CTF exchange or neg-risk exchange) from the market’s venue. Requests are HMAC-signed from the token. The repo’s own tests re-derive the documented order struct with an independent library and assert the SDK signs the same bytes, so an SDK bump that changes what is signed fails in CI rather than at a live order.
Read
settlementStatus, not matched. The create-order response tells you what happened in execution.settlementStatus: MINED means settled; UNMATCHED means resting for a GTC but killed for a FOK or FAK; DELAYED means the market’s taker delay is holding a marketable order until eligibleAt, which is not an error. The fill then arrives over order events or POST /orders/status/batch. postOnly quotes and GTC orders are never delayed. Rejected orders come back as an HTTP status with a message and no machine-readable code. See Maintenance mode for the other reason a delayed fill can wait past eligibleAt.Authentication
Scoped tokens, HMAC signing, and which auth mode fits which flow.
EIP-712 signing
The exact typed data your wallet signs, and the trading-wallet mode rule.
Venue system
Default CTF vs neg-risk exchange routing and approvals.
WebSocket
Orderbook snapshots and updates, your order events, positions.
Responsible trading agents
Prohibited conduct, exchange-side safeguards, and the limits your bot must enforce.
AI agent operation
AGENTS.md in the repo is the operating contract and SKILL.md is the manual. Point Claude Code, OpenClaw, or any coding agent with shell and file access at them. The agent handles setup, the preflight, strategy selection, deployment, and monitoring; the human keeps the private key and the token out of the agent’s context and funds the wallet.
The manual covers the SDK surface, websocket semantics, fees and the taker delay, the partner flows, and the known footguns, so the agent does not have to guess which API call does what. It also points the agent at the docs MCP server for anything newer than the manual.
Support
- Builders Chat: t.me/LimitlessBuildersChat, the Telegram community for API and SDK builders
- Repo issues: github.com/limitless-labs-group/agents-starter/issues
- Docs MCP server for coding agents:
https://docs.limitless.exchange/mcp - Trading MCP server for AI assistants: MCP server
- SDK reference: TypeScript SDK