Right now on Phoenix
the page's hero ticket
Asking Phoenix's public mainnet API through the same rules module the CLI and MCP server run.
Limits no agent tool can change, for AI agents that trade Phoenix perps on Solana. The agent asks with plan_order; Reins checks your policy against Phoenix's own live data and either refuses, naming the rule, the Phoenix field and what would fit, or returns a single-use plan_id that place_order re-checks before anything is signed.
the page's hero ticket
Asking Phoenix's public mainnet API through the same rules module the CLI and MCP server run.
The first screen is a real ticket checked against current Phoenix data. On weekends: TSLA refused, market closed, from Phoenix's own calendar, with the reopening time.
reins.edycu.dev →Change the ticket to SOL, $500 at 10×. Reins refuses it on minLiqDistancePct: liquidation sits closer to the fill than the 15 % floor, and the ticket names the Phoenix source and what fits.
A headless Claude Code session was tasked with SOL $40 at 10× and told to take what fits, then close. Reins refused it (liquidation 7.9 % away) and offered $20 at 5×. The agent placed that on Phoenix mainnet and closed it. Every journal row is on the page.
receipts →16 Phoenix order transactions, signed by an agent key that can trade but never withdraw, are each re-read from Solana (DEMO.md). The owner's policy pin and DelegateTrader are below.
getTransaction; 17 refusals signed nothing; −$0.16 of USDC in fees and price moves on a $51.67 account, plus 80,000 lamports of Solana fees and a one-time 2,275,840-lamport subaccount rent, both paid by the agent keyDEMO.md · evidence/receipts/summary.json/api/plan re-planning one market (p95 379 ms, n = 12)evidence/bench.jsonMemo reins-policy:v1:<sha256> of the policy file, signed by the owner wallet. Tier B opens positions only while it matches; reduce-only closes are not pin-gated.
Makes the agent key a position authority: it can trade the account, it cannot withdraw, deposit or re-delegate.
5UJx73AWHD…wLZvn on Solscan ↗After Reins refused $40 at 10×. Phoenix put liquidation 18.74 % away; Reins read that back after the fill.
4iu71krEX4…Raem on Solscan ↗close_position: a reduce-only sell of all 34 lots; the margin went back to the main account.
Seven open-and-close round trips, $20–25 at 2–3×, and the refusals around them, each with its Solscan link and Phoenix's liquidation price.
DEMO.md ↗# Node 22. Reads Phoenix's public API; no key, no account. $ git clone https://github.com/edycutjong/reins $ cd reins && npm install $ node src/cli.mjs demo-order # holds right now $ node src/cli.mjs plan SOL long 500 --lev 10 # exit 0 cleared · 2 refused · 3 Phoenix unreachable # as an MCP server for Claude Code $ claude mcp add reins -e REINS_POLICY=$HOME/.reins/policy.json \ -- node "$PWD/src/cli.mjs" mcp
# Frozen Phoenix responses, for repeatable checks only. # Not the product: the product is the live path on the left. $ npm test # 179 passed, 2 gated $ npm run eval # 11/11 on captured states $ REINS_LIVE=1 npm test # adds the live flow
The real orders were $20–25, held under a minute, on one funded account. Reins opens longs only (no documented price bound for opening a short); closes are reduce-only sells with a 100 bps proceeds floor. The page you can try is read-only: live Phoenix data on a hypothetical account, no wallet.
An agent that bypasses Reins and holds its own Phoenix key can trade without it. DelegateTrader bounds what the agent key can do (trade, not withdraw); it does not cap order size. The policy pin makes a loosened file fail closed.
Before an order, liquidation is Phoenix's Rise margin calculator run locally. After each real fill Reins reads Phoenix's own number back; on 8 fills Reins' at-mark estimate was within 23 bps of it (the worst-case-fill estimate it judges on was 30–83 bps more cautious on the 7 fills that recorded it). Only Claude Code sessions are recorded; the Codex CLI wiring is documented but was never run (usage limit).
Built for the Solana Perps & Prediction Markets hackathon, Dec 2026. Reins is free; Phoenix charges its normal taker fee. MIT licensed.