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.
What’s included
agents-starter is a small TypeScript project. It uses the official@limitless-exchange/sdk for order placement, market data, and websocket streaming, plus a few hand-rolled helpers (Pyth price feed, Polymarket adapter, diagnostics) that aren’t in the SDK.
| File | What it does |
|---|---|
src/strategies/ | Three strategies: cross-market-mm (flagship — see Cross-market market making), oracle-arb, certainty-closer. |
src/core/limitless/ | Thin wrappers over the SDK + utilities the strategies share. |
src/core/kelly.ts | Fractional-Kelly position-sizing util. |
src/scripts/ | One-shot diagnostic scripts (balance check, orderbook inspector). |
SKILL.md | OpenClaw / Claude Code skill manifest — agents can read it and run the bot end-to-end. |
5-minute setup
- limitless.exchange → Connect wallet
- API token modal → API Tokens tab → Derive
- Copy the
tokenId+secretinto.envasLMTS_TOKEN_ID+LMTS_TOKEN_SECRET
Run a strategy
Always start withDRY_RUN=true in .env — every order intent is logged but nothing signs or posts.
Use a small
usdAmount for your first live runs (start at 5 per order). Strategies are conservative by default but no bot is bug-free.Built-in strategies
Each strategy is an entry point — pick one or fork it.cross-market-mm (flagship)
Cross-venue market making: quote on Limitless, hedge fills on Polymarket to stay delta-neutral. Earns the cross-venue spread plus Limitless maker rebates + LP rewards. It has its own full guide — see Cross-market market making.
oracle-arb
Cross-references a Pyth (Hermes SSE) oracle price against Limitless markets that resolve on the same underlying. Submits FOK/FAK orders when the implied probability strays far enough from the oracle to cover fees + slippage. The price-feed / edge-detection archetype.
certainty-closer
The simplest on-ramp — SDK-only, no external feeds. Filters markets near resolution and buys the favourite, sized via fractional Kelly (src/core/kelly.ts). Honestly framed: on its own it has no independent edge (the edge is one you assert); it’s the cleanest example of the market-filter → decide → execute loop.
Bring your own strategy
The example strategies (oracle-arb, certainty-closer) extend BaseStrategy (src/strategies/base-strategy.ts); the flagship cross-market-mm has its own runtime loop. To build one on BaseStrategy:
- Implement
tick()— return a list ofTradeDecisions based on whatever signal you care about. - Implement
initialize()/shutdown()for setup + teardown. - The base class runs the tick loop and handles order placement + DRY_RUN gating.
run.ts next to it that wires up the runtime, and add an entry to package.json scripts.
Under the hood
agents-starter uses the official@limitless-exchange/sdk for everything order-related. The signing path is EIP-712; the SDK handles venue-specific routing (default CTF vs neg-risk exchange) automatically based on the market metadata.
Taker delay. Some markets apply a short hold to marketable (taker) orders — the FOK/FAK orders strategies like
oracle-arb submit — before the matching engine fills them. On such a market, order submission is asynchronous: the create-order response comes back with settlementStatus: "DELAYED" and an eligibleAt timestamp rather than a finished fill, and the actual fill arrives later over the order-events websocket (provisional MATCHED → terminal MINED / FAILED). Observe the fill on that stream — don’t treat the DELAYED response or the gap before the fill as an error. postOnly maker quotes are never delayed. See WebSocket Events.Authentication
API tokens, HMAC scoping, and which auth mode to use for which flow.
EIP-712 signing
The exact typed-data structure your wallet signs to place an order.
Venue system
Default CTF vs neg-risk exchange routing and why it matters.
WebSocket events
Real-time price + fill + portfolio updates.
AI agent operation
SKILL.md in the repo is the operating manual for an AI agent. Feed it to Claude Code, OpenClaw, or any coding agent with shell + file access. The agent handles:
- Environment + dependency setup
- Wallet configuration
- Strategy selection based on what you ask
- Deployment + monitoring + iteration
What’s next
Recently shipped, and on the roadmap:- Cross-market market making — the
replicatorstrategy mirrors a Polymarket book onto Limitless as resting quotes and hedges fills back on Polymarket to stay delta-neutral. Earns the spread + Limitless maker rebates. - Inline tutorial prompts so a fresh agent run starts with “which strategy do you want?”
- Per-strategy backtesting against historical fill data.
Support
- Repo issues: github.com/limitless-labs-group/agents-starter/issues
- Live MCP docs server for AI agents:
https://docs.limitless.exchange/mcp - SDK reference: TypeScript SDK guide