System diagram#
A message or a ticket reaches the gateway. The agent turns words into an order card, the risk engine decides whether the card may exist, you confirm it, and the paper engine fills it. Live orders take the venue adapter instead, and only when the server allows it.
Design principles#
- The server decides. Prices, limits and fills are computed on the server. The browser cannot widen a cap or supply a price.
- The model proposes, it never prices. Fields the model invents, including any price, are dropped before a card is built.
- One path. Agent cards, the ticket and the one-click buttons share the same checks and the same fill code.
- Fail closed. No usable price means no order. A stale quote refuses new orders and fires no stop or liquidation.
- Closing is always allowed. The emergency stop, the trading halt and the daily loss stop block new risk. They never block a close.
Components#
| Component | What it does |
|---|---|
| Gateway | Next.js route handlers. Every write needs a signed-in session and a same-origin request. Order and stream routes are rate limited. |
| Agents | A bot per teammate. Each turn sends a minimized market snapshot to the chosen model and parses a fixed JSON reply into at most one order card. |
| Risk engine | Fourteen checks on every card, plus caps, the daily loss stop, the per-user emergency stop and the trading halt. |
| Paper engine | Order types, isolated margin, fees, funding, stop and target triggers, liquidation and resting orders, as pure functions over your book. |
| Market feed | One Hyperliquid info call per few seconds for every market, plus one-minute bars for the extremes since the last check. |
| Venue adapters | Hyperliquid is the only venue with a live path. Elysium is listed with prices and cannot sign an order. |
| State | Your book, orders and activity are kept on the server and sealed at rest. See Privacy & security. |
Gateway#
A session cookie proves who you are after a wallet signature. Writes also need the request to come from the same origin, and the paper order route allows 60 requests a minute per account. The browser holds no secrets and no limits of its own.
Agents#
An agent has a name, a mascot, a model and a style note. Its chat is stored per account. The style note can change tone. It cannot override the reply format, the market data or the guardrails. See Agents & strategies.
Paper engine#
The engine is a set of pure functions: place an order, set triggers, run the clock. It takes a book and a set of quotes and returns a new book and a list of events. It has no network access and cannot reach an exchange. Fills are simulated at the guarded mark with a per-order liquidity cap. There is no order book and no counterparty, so nobody else’s order changes your fill and there is no auto-deleveraging.
Order lifecycle#
Inside the paper engine every order passes the same four gates, then ends as a fill, a resting order or a refusal. Refusals change nothing: no fee, no margin, no position.
What is not here#
- No cross margin and no portfolio margin. Every position is isolated.
- No auto-deleveraging. Paper fills never depend on other accounts.
- No order book depth model. A per-order liquidity cap stands in for it.
- No background engine. The clock runs on your requests.