Reins
Non-custodial · your funds stay in your own Hyperliquid account

Let an AI agent trade without giving it the power to lose everything.

Reins sits between your agent and Hyperliquid. Position size, leverage, daily loss, which markets it may touch and a stop on every position are enforced outside the model, and every decision is written down with the reason the agent gave for it.

$ npx @r2rlabs/reins init
terminal
$ npx @r2rlabs/reins init
✓ Paper mode — live prices, simulated fills, no capital at risk
✓ Limits — max position $5,000 · daily loss $500 · $100 risk per trade · BTC, ETH
✓ Decision log — ./decisions.jsonl
✓ Builder fee — 2 bp to Reins on live orders; paper results include it
→ 9 tools on stdio. Point your agent at it.

What it does

Limits it can't argue with

Position size, leverage, daily loss, a market allowlist, and a cap on what one trade may lose if its stop fills. There is no tool that changes them, so no prompt or clever reasoning gets past them.

Rehearse on real prices

Paper trading on live Hyperliquid prices with realistic fills and fees, using the same tools and the same limits as live. Nothing is signed, and no key is needed.

Every decision on the record

Each order, refusal, wait and stop-out is stored with the reason given for it. When something strange happens at 3am, you can read exactly what it thought it was doing.

Any bot can plug in

Agents speak to Reins over MCP. Everything else speaks HTTP: swap “send this order to the exchange” for “send it to Reins”, and inherit the limits and the log without changing anything else.

$ npx @r2rlabs/reins http --port 8787

$ curl -H "Authorization: Bearer $TOKEN" \
    -d '{"symbol":"ETH","side":"buy","sizeUsd":1000,"stopLoss":2620,"reason":"Breakout retest"}' \
    http://127.0.0.1:8787/orders

400 BLOCKED (TRADE_RISK_TOO_LARGE): Stopping out would lose $50.99,
    over the $30 allowed on one trade. Move the stop closer or send a smaller order.

Routes for limits, positions, book, candles, orders, stops, cancels, closes and the log itself. It binds to your own machine and needs a token; a refused order comes back with the limit that stopped it.

Most Hyperliquid bots are Python, so there is a client rather than a snippet — pip install reins-client, no dependencies. A refused order raises Refused carrying the code, and size_for_risk() is the same arithmetic the engine checks, so an order can be sized into the per-trade limit instead of being refused by it.

What the record is for

An agent's explanation of its own trading is testimony, not fact. Reins stores the reason and the outcome side by side, so the two can be compared.

In a five-day paper run, the log caught the agent misreporting its own trade twice. Once it wrote that it was exiting at 81,021 “rather than wait for the 81,060 stop”. It filled at 81,063, worse than the stop it meant to beat.

From that run: 111 hourly cycles, 10 trades, ending at −0.21%.
$17.08Worst single trade, 0.17% of the account
0Positions left without a stop, and 0 orders that breached a limit
7 of 10Trades closed by a stop the exchange held, several while the agent slept
141Records written, including the 72 times it decided not to trade

What Reins is, and is not

What it is

  • Limits outside the model. Checked before anything reaches the exchange.
  • A record you can check. Refusals and waits included.
  • Somewhere to rehearse. Paper trading on live prices, free.
  • Non-custodial. It trades through an API wallet that cannot withdraw.
  • Paid for openly. A 2 bp builder fee on live orders, shown up front.

What it is not

  • Not a trading bot or a strategy. It doesn't decide what to trade.
  • Not an exchange, broker or custodian. Hyperliquid matches the orders.
  • Not a promise against losses. Limits cap what can go wrong, not the market.
  • Not financial advice.
  • Not something you take on trust. Every action is on the record.
  1. Limits live outside the model.
  2. The record outranks the reasoning.
  3. Paper before real money.
  4. Your keys, your funds.

Start on paper

Paper trading costs nothing and needs no key. Point Claude, Cursor, or your own bot at it and watch what it does.

$ npx @r2rlabs/reins init

Two ways to run it

Reins as an MCP server

On your own machine, free and open source. Connect Claude Desktop, Claude Code or Cursor and the model trades behind limits it cannot change.

Reins Cloud

The same engine hosted: keys in a KMS, orders over your threshold held for your approval, a kill switch only your login resets, and alerts on your phone.