Lobster Agent Trader

Lobster Agent Trader

Turn the AI tokens you never spend intopositions that actually run.

An allowance ledger, structured decisions and hard guardrails — one loop that puts an idle monthly budget to work on Lighter.

agent cyclesnapshot → decision → guardrails → order → ledger
  1. 01 Market snapshot

    • Order book and depth
    • 15m candle series
    • Funding rates
    • Tick size and minimums
  2. 02 Structured decision

    • action / side / size
    • Self-reported confidence
    • Thesis and invalidation
    • Never free-form CLI args
  3. 03 Guardrails and ledger

    • Allow-list and notional cap
    • Leverage and position caps
    • Cooldown and daily loss cap
    • Token spend recorded

Three pieces, and the idle allowance is trading.

An allowance ledger, the official agent kit, and a decision loop with guardrails.

  • Setup

    Adopt the Lighter Agent Kit

    Market data, order signing and paper fills all come from the official lighter-agent-kit. This project only does decisions, accounting and risk — it never re-implements signing or tick maths.

    $ npm run setup
  • Ledger

    Make "unused" measurable

    Your monthly token budget minus the part reserved for normal work is what the trader may spend. Every token is recorded, and when the allowance runs out the engine stops by itself.

    budget − reserved = tradable allowance

  • Agent

    Let the loop run itself

    Each interval it pulls a snapshot, asks the model for a structured decision, runs the guardrails, then executes. Blocked decisions are archived too — nothing disappears silently.

The model has to clear this first.

Guardrails run before an order is built. A decision they stop becomes a blocked run you can inspect, rather than something that quietly disappeared.

  • GATEBTCRisk layerAnything off the allow-list is refused3 symbols
  • GATEETHRisk layerOversized orders are clamped, never scaled up$250 / order
  • GATESOLRisk layerLeverage, position count and daily loss, all capped≤3x
  • GATERUNRisk layerA blocked decision becomes a visible blocked run48 / day

Start in paper mode.

The default never touches real money. Going live needs three locks open at once.

  • Paper

    Default

    Local matching against Lighter's live book. No signing, no broadcast, and no credentials required.

    Create a paper account
  • Live

    Three locks

    A server environment variable, the switch in Settings, and a typed confirmation before the mode changes. Miss one and it will not start.

    LIGHTER_ENABLE_LIVE=1
  • Emergency

    Stop

    Stopping the engine is one click. Flattening everything first previews the positions it would close, then demands an explicit confirmation.

    Open the controls

Every decision
leaves a record.

Each run keeps the market snapshot the model was given, its raw reply, the full trace, and what the decision cost in tokens.

Snapshot
The exact data the model saw, archived as-is.
Trace and status
Every step with its timing, kept alongside the run.
Spend and cost
Tokens and dollars for each decision.

Let us be clear about the edges.

An experiment in putting a wasted allowance to work — not a promise of returns.

What exactly counts as "unused AI tokens"?

The slice of your monthly model budget you will not spend on ordinary work. This project turns that remainder into an explicit allowance, lets the agent spend only that, and stops the moment it is gone.

Does it place real orders?

Not by default. It ships in paper mode: a local simulation against Lighter's live order books, with no signing and no broadcast. Going live takes three things at once — LIGHTER_ENABLE_LIVE=1 on the server, the switch in Settings, and typing a confirmation in the console.

Can I trust the paper P&L?

No. Paper fills are taker-only, and the simulator models neither order impact, nor latency, nor partial fills. It also ignores funding, which for a position held overnight is usually the single largest driver of P&L. The console says so wherever it shows paper numbers.

Can the model place whatever it likes?

It can only emit a structured JSON decision — it never touches a command line. Order parameters are computed locally from live market metadata and the guardrails. Notional, leverage, position count, cooldown and daily loss all have hard caps, and hitting one stops the engine.

Do I have to hand over a private key?

No. It reuses the kit's credential model: the Lighter API key stays on the machine and never passes through the browser, the logs or the database. A model API key can live in .env.local or in the local database, and the API only ever reports whether one is set.

Who eats the losses?

You do. This is experimental software and live orders and withdrawals cannot be reversed. Prove a strategy on testnet first, then trade only what you can afford to lose.

Get the allowance right first.Then decide whether it shouldtrade for real.