Skip to main content
Every trade in the app goes through your trading account. You set it up once, fund it from your wallet, and then trade with a trading key that lives in your browser and signs without a wallet prompt. Hyperliquid works the same way: a deposit, then trading with a key that can trade but can’t take funds anywhere else. The account trades every venue: Tokens you buy stay in the account until you withdraw them. They’re the same SPL tokens as anywhere else, and moving them to your wallet takes one click.

Setting up

One wallet approval does three things:
  1. Opens the account: a record of who may trade for you, and a trader address that holds your funds, book seats and orders.
  2. Puts a trading key in your browser, made by the browser’s crypto API with a private key that can’t be exported, and stored for this site only.
  3. Sends about 0.03 SOL: rent for book seats, orders and committed orders, and fees for the key’s transactions. You can take what’s left back.
The key lasts 30 days, the program’s maximum. Turn off revokes it at once and sends its unused fee SOL back.

What the key can do

Nothing the key signs can send funds anywhere except your own wallet. The program checks that every withdrawal pays your wallet’s own token account, whoever signs it. A stolen key could still trade badly with an accomplice on the other side of a book. So the program holds every key-signed book order, and every key-signed pool fill, to a backstop band around the posted price: 3 · σ · √(t / 30s) + 10%, clamped to 10%–25%. A pool fill is judged on what actually moved, so a key can’t force a fill deep into the book either. Committed orders fill at the official price, so there’s no one to trade with. Orders your wallet signs are not checked. There’s no per-order limit. The program supports one, but it would bound each order, not the total, so a thief would just place more orders. The band is what limits the damage.

Funding a trade

A trade draws on the account first. A book order uses that book’s seat first, then the account. If neither covers it, the app moves the difference in from your wallet in the same transaction, and your wallet signs that one instead of the key. When the account’s rent SOL is low, a wallet-signed trade tops it back up in the same approval. After a fill, proceeds stay in the account, ready for the next trade. A committed order that can’t fill is refunded to the account.

Where a market order goes

The app quotes the protocol’s venue and the order book side by side and sends a market order to whichever gives the better price. One that fills the whole order beats one that only fills part, and you can pick the other one.
  • While a market is open, the protocol’s venue is a committed order, estimated at the current price; it fills at the next one. While committed orders pause for a top-up, or one of yours is pending, the book still trades.
  • While a market is closed, it’s the pool.
  • Limit orders always rest on the book.

While a market is closed

The pool quotes from the last official price. When outside markets move past its spread (Hyperliquid’s stock perps, pre- and after-hours quotes, index futures, Coinbase’s gold and euro tokens), the keeper pulls the side a trader could profit from. The side left behind still prices the close, so the app warns anyone trading into it: after a rise, a sale on the pool gets a bid from before the move, and the order book may pay more.

Your balances

The trading panel shows the account’s cash and tokens for the market you’re on. The portfolio counts everything the account holds: its token accounts, its seats on every book, and what its open book orders have set aside. Mint, redeem and burn still spend from your wallet, so withdraw first if you need tokens there.

Closing the account

Close account returns everything to your wallet. It first sends every balance, in the account’s token accounts and in its book seats, back to your wallet with the key. Then one wallet approval sends the key’s unused fee SOL back and closes the account, its token accounts and its rent. It waits while you have open book orders or a committed order in flight. One cost never comes back: each book seat, and each book slot an order once needed, is an 80-byte block of rent that Manifest keeps. The seats stay yours, and work again if you open the account later.

Program

trading, Anyy78cCJqapwvvFsignmQ45an5PCg9HfeDhDtAPNfmA (devnet). IDL: idl/trading.json. A committed order placed from the account is owned by the trader address, so settlement pays its token accounts and refunds return there, the same as for any other order.