Use case · Trading agents

The overnight run,
survived by design.

An automated trading agent is easy to start and hard to leave alone. This is the shape of one built on Moneo: a funded wallet whose keys the model never sees, a policy that prices the worst case before the first order, exits attached at submission, and a ledger that makes the morning after boring.

import { createGuard } from "@moneolabs/guard";
 
// What tonight is allowed to cost, written down before it starts.
const guard = createGuard({
perTransaction: { max: "400 USDG" },
rolling24h: { max: "2,000 USDG" },
velocity: { max: 10, per: "1h" },
positions: { maxPerSymbol: "1,500 USDG" },
counterparties: "allowlist-only",
allow: ["venue:verified", "x402:api.pricefeed.dev"],
escalate: { above: "1,000 USDG" },
});
Runs against the sandbox ledger with test funds. The policy, the strategy, and the morning read are the same code in production.
The walkthrough

Four steps between an idea and an unattended agent.

01

Fund a wallet on the sandbox ledger

One call issues an account for the agent with test funds. Keys stay in the signer; the model gets a handle it can safely paste into a log, because it will.

02

Declare what a bad night is allowed to cost

Notional per trade, a rolling daily budget, per-symbol position caps, and a threshold above which a human gets pinged instead of a fill. Policy is data, versioned like code.

03

Hand the strategy its tools and walk away

Expose quote, execute, positions, and close over MCP or function calling. Every order the model dreams up passes the guard before anything is signed. Brackets mean every entry carries its own exit.

04

Read the ledger with your coffee

Fills, rejections, and every blocked attempt with the reason and the policy version that decided. The blocked list is where you learn what your agent almost did.

3 a.m.

Everything that goes wrong while you sleep, priced in advance.

The 3 a.m. retry loop

A transient venue error convinces the agent to try again, forever. Each retry burns the rolling budget, not the balance. When the budget is gone, every attempt comes back as a structured block it can reason about, not an exception it can swallow.

Prompt injection

Something in the context window asks the agent to send funds somewhere new. The counterparty is not on the allowlist, so the transfer never reaches a signature. The attempt is in the morning ledger, which is how you find out it happened.

Oversized conviction

The model decides one symbol is a generational opportunity at 2 a.m. Per-symbol concentration caps reject the order at submission. Conviction is free; concentration is bounded.

The thin book

Overnight liquidity is not daytime liquidity. Every order carries a slippage bound, so a book too thin to fill inside it produces a rejection, not a fill you discover on the statement.

The missed exit

The process that was supposed to watch the stop crashed at midnight. Brackets attach the take-profit and the stop at submission, so the exit exists whether or not your infrastructure stayed up.

Overnight run · 8h
Agent
overnight-momentum-01
Orders filled
6
Blocked
2 · reasons logged
Held for approval
1
Budget used
1,640 / 2,000 USDG
Realized P&L
+31.80 USDG
Key exposure
none

Tonight can be a test run.

Sandbox funds, real routing behaviour, and a ledger to read tomorrow. No card, no waitlist.

Get Started