Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.limitless.exchange/llms.txt

Use this file to discover all available pages before exploring further.

agents-starter is the canonical end-to-end starter for building an autonomous trading agent on Limitless. Fork it, set two env vars, and run a strategy in DRY_RUN within five minutes.
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 (price feeds, dashboards, automation scripts) that aren’t in the SDK.
FileWhat it does
src/strategies/Four ready-to-run trading strategies (signal-sniper, conviction-sniper, oracle-arb, cross-market-arb).
src/core/limitless/Thin wrappers over the SDK + utilities the strategies share.
src/core/price-feeds/Coingecko and Pyth Hermes adapters used by the price-aware strategies.
src/scripts/One-shot diagnostic scripts (balance check, orderbook inspector, debug scan).
SKILL.mdOpenClaw / Claude Code skill manifest — agents can read it and run the bot end-to-end.

5-minute setup

[!IMPORTANT] Generate a dedicated wallet for this bot. Fund it with only what you’re prepared to lose on Base. Do not use your main wallet.
git clone https://github.com/limitless-labs-group/agents-starter.git
cd agents-starter
npm install

cp .env.example .env
chmod 600 .env
# Edit .env, fill in PRIVATE_KEY (your dedicated wallet) and LIMITLESS_API_KEY
Get your API key from the Limitless UI:
  1. limitless.exchange → Connect wallet
  2. Profile → API Keys → Generate
  3. Copy into .env as LIMITLESS_API_KEY

Run a strategy

Always start with DRY_RUN=true in .env — every order intent is logged but nothing signs or posts.
# Dry run (no real trades)
DRY_RUN=true npm run oracle-arb

# Live trading once you're satisfied with the dry-run log
DRY_RUN=false npm run oracle-arb
Use a small usdAmount for your first live runs (start at 22-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.

signal-sniper

Scans for short-lived mispricings against an external reference (Coingecko price) and snipes them with FOK orders. Best for: macro markets (BTC/ETH price targets) where the underlying moves on-chain faster than the prediction-market book updates.
npm run signal-sniper

conviction-sniper

Identifies markets where the orderbook implies a probability inconsistent with on-chain oracle data (Pyth Hermes). Posts a single high-conviction position when the gap is wide enough.
npm run conviction-sniper

oracle-arb

Cross-references a Pyth oracle price against Limitless markets that resolve on the same underlying. Submits FOK or FAK orders when the implied probability strays far enough from the oracle to cover fees + slippage.
npm run oracle-arb

cross-market-arb

Looks for related markets within Limitless (e.g. “BTC above X by date” and “BTC above X+10k by date”) where the probabilities imply an inconsistent joint distribution. Captures the spread with paired orders.
npm run cross-market-arb

Bring your own strategy

Every strategy extends BaseStrategy (src/strategies/base-strategy.ts). The pattern:
  1. Implement scan() — return a list of TradeDecisions based on whatever signal you care about.
  2. Implement shouldExit() — return positions you want to close.
  3. The base class handles order placement, retry, and DRY_RUN gating.
import { BaseStrategy } from './base-strategy.js';

export class MyStrategy extends BaseStrategy {
  async scan() {
    // your edge logic — return TradeDecision[]
  }

  async shouldExit() {
    // your exit logic — return positions to close
  }
}
Create a 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. For background on the protocol layers the agent is interacting with, see:

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
The manual covers SDK reference, partner integration flows, error handling, and known footguns — designed to remove the back-and-forth of “what API do I call for X?”

What’s next

The roadmap includes:
  • A cross-venue replicator strategy that mirrors Polymarket orderbook depth onto Limitless and hedges back on Polymarket. 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