PUBLIC LAUNCH · 1 DEC 2026

Docs · Owner limits

DOCS · OWNER LIMITS

Owner limits

You set the limits when a session starts. Your agent can tighten them and can never raise them. These are limits you set; losses are still possible.

The model

Presets

LimitConservativeStandardProHard ceiling
Max leverage3x5x10xPer-coin max
Per-order cap$10k$25k$250k20% of depth
Daily stop3%5%10%25%
Open positions351550
Max slippage25 bps50 bps100 bps300 bps
Order rate2/s5/s10/s10/s
import { GuardSession } from "@perpbrain/sdk";

const session = GuardSession.fromConfig("standard");   // default

Depth and leverage

The per-order cap is the lesser of the preset dollar amount and 20% of visible book depth inside the slippage cap. Effective leverage is the lesser of the preset and Hyperliquid's per-coin max, halved for coins outside the top 20 by open interest.

Closing is always allowed

Stale data, the daily stop and the kill switch only block new risk. A close or reduce always goes through.

RuleBlocksCode
Data older than 2sNew opensstale_data
Data older than 5sAll new risk (halt)stale_halt
Daily stop reachedOpens until 00:00 UTC (reduce-only)daily_stop_reduce_only
Kill switch latchedOpens until owner config changes and the session restartskill_switch

Kill switch

A tool call can engage it with trigger_kill_switch. Nothing inside the session can clear it. It clears only when you change the owner config and restart. A restart with the same config keeps the latch.

Block codes

A blocked simulated order raises GUARD_BLOCKED:<CODE> with the headroom left: coin_not_allowed, notional_exceeded, aggregate_notional, depth_cap, leverage_exceeded, open_positions_exceeded, daily_stop_reduce_only, slippage_exceeded, order_rate, stale_data, stale_halt, kill_switch.

On the receipt

Each run records guard_preset, limits, effective_limits_per_coin, loosened, limits_hash and market_snapshot_id, so anyone checking the receipt can see exactly which limits applied.