Trade with Hyperliquid
Review an order, authorize it under a Pakt, and check what actually filled.
This guide takes you from an active Pakt to a recorded order result. It requires full access, completed Hyperliquid setup, and an agent with a venue client that can prepare and submit orders. Your Hyperliquid master account must have the collateral required by the venue and your Pakt.
Connecting Pakt does not install that venue client or provide a trading strategy. If your agent cannot prepare and submit Hyperliquid orders, it can still help with drafts and reviews, but this workflow stops there.
For a custom client, use the MCP reference together with Hyperliquid's exchange API documentation. Send the payload signed by Pakt; do not add another signing path or give the agent a private key.
1. Prepare an Order for Review
Here is a small, illustrative order—not a trading recommendation. Replace its market, amount, and limits with your own choices before using it:
Find my active Pakt for BTC and ETH and show its root. If more than one
matches, ask me which to use. Check its current execution context.
Prepare a $25 BTC buy as an immediate-or-cancel order with a limit price.
Show the market, side, size, limit price, maximum order value, and expiry.
Do not request authorization or submit yet.Your agent should show one exact order and the selected Pakt root. Review both. A dollar target is not itself an order: the venue client must resolve the current market, quantity, price, precision, nonce, and deadline.
An immediate-or-cancel (IOC) order fills available liquidity within its limit price and cancels the remainder. Pakt currently accepts one such perpetual order per Hyperliquid request, not spot trades or resting limit orders.
2. Authorize and Submit
When the reviewed order matches your intent, explicitly tell the agent to proceed:
Request authorization for the exact order and Pakt root we just reviewed.
Wait for the authorization result. If signed, submit the returned request
unchanged. If refused, stop and report the returned reason without guessing
which rule failed.
Report the Pakt decision and the venue result separately.Your agent calls propose_execution, which synchronously returns the signed, refused, or recovery-required result. Pakt checks the supplied order; it does not choose a trade or repair it. Signing can occur during this step.
Only one proof operation may run for an account. If another caller is already
using that account, account_proof_in_progress means this request did not start
proving or signing. Wait for the active operation, refresh execution context,
and rebuild. Bundle related Hyperliquid trades into one request.
If the order expires before submission, do not edit the signed request. Review the existing authorization and venue result before preparing any replacement.
3. Check the Result
| What you see | What it means |
|---|---|
| Signed | Pakt returned a signed request, but has not submitted it |
| Refused | A rule failed; no wallet signature was released |
| Filled or not filled | The venue has a result; an IOC order need not fill |
| Error or needs attention | The outcome needs investigation; do not assume nothing was signed |
A refusal is a completed policy decision. Do not ask the agent to bypass it. If you want a different action or different rules, make that decision explicitly.
Open the action in your dashboard. After the venue reaches a supported terminal result, the submitting client can call record_execution_completion to display it alongside the receipt.
You are done when you have checked the venue outcome, not merely seen Signed. The receipt proves Pakt's decision; the completion annotation is client-reported and is not independent proof of a fill.
Close a Position
Ask your agent to prepare a reduce-only order for the exact position you want to close, then follow the same review and authorization steps. Reduce-only is a property of the submitted order, not a synonym for “sell.” Other rules can still refuse it. See Closing a Hyperliquid Position.
For stuck operations, expired requests, and uncertain submission outcomes, use Troubleshooting.