[ guide ]
Trading-Only Permissions: The Safety Bedrock
Last updated: November 2026 · 6 min read
Separate trading from withdrawal at the wallet, then separate allowed operations from everything else at the policy. That is the architecture an AI agent's budget should sit behind.
Two rights, two places
Trading and withdrawal are different rights. A trading-only agent wallet can place and cancel orders; it cannot move the budget out. The separation happens at the wallet boundary, not in the prompt.
This matters because prompts can be injected, models can hallucinate and code can loop. A policy in front of the API bounds what the agent may ask; the wallet boundary bounds what the agent can do even if the API is bypassed.
How approveAgent works
On Hyperliquid, the account owner signs an EIP-712 approveAgent authorization for a separate agent wallet. The wallet receives trading rights only. The owner's key stays with the owner; the agent key does not need it.
The owner can revoke the agent wallet at any time. If the agent key leaks, an attacker can trade within the policy and the budget, but cannot withdraw.
What a trading-only wallet does not solve
It does not stop a bad strategy, an over-sized order or a loop. That is what the key policy and the platform risk envelope are for: allowed operations, per-call cap, daily cap, coin allowlist, position sizing, stop-loss and daily breakers.
It also does not remove venue or market risk. The budget is still at risk of trading loss; trading-only only removes the withdrawal path.
Builder checklist
Use the wallet boundary and the policy boundary together. Test both in the sandbox before funding a live account.
- Trading-only agent wallet approved by the owner, revocable.
- Key policy enforced server-side, not in the model prompt.
- A 403/409 refusal is surfaced, not retried unchanged.
- The owner's key never enters the agent runtime.
[ build with it ]
One API key per agent, server-enforced caps, a trading-only wallet and audit receipts. The cockpit is a demo; the Agent API is the product.
For agents: /llms.txt · /.well-known/agent.json · /api/agent.openapi.json
FAQ
What does trading-only mean?
The agent wallet can place and cancel orders but cannot withdraw. The owner approves it on Hyperliquid with EIP-712 approveAgent and can revoke it.
Is a trading-only wallet the same as a policy cap?
No. The wallet boundary blocks withdrawal at the venue; the key policy blocks operations, sizes and coins before the API. Use both.
Can the owner revoke the agent?
Yes. Revoking the agent wallet removes its trading rights; disabling the API key removes the agent's access to the control plane.
Educational content, not financial advice. Read the Risk Disclosure before enabling live mode.

