hyperliquid tool covers perps, spot, HIP-3 markets and HIP-4 outcome markets on Hyperliquid. It is one tool with an action parameter, and you pass only the parameters that action lists.
For what the venue is and how funding works, read Hyperliquid first. Every action needs authentication; see Authentication. A call looks like this:
Actions
Actions marked write place orders, move funds or change account settings. Show the user a summary and get a yes before calling them. Every trade needs the user’s confirmation, and nothing here is financial advice.Market data
Account
Orders
TWAP, leverage and funds
Outcomes (HIP-4)
User-scoped reads such as
get_account_summary, get_open_orders and get_user_fills accept an optional address. Set it to read another wallet; leave it out for the caller’s own data. get_deposit_address always returns the caller’s address.
Request-shape rules
A correctplace_order call:
grouping is na by default, normalTpsl to group a take-profit and stop-loss with an entry, or positionTpsl to attach them to an existing position.
Asset index
Computea from get_market_metas. Do not guess it.
update_leverage, update_isolated_margin, cancel_order and place_twap_order take the same numeric index. A symbol such as xyz:NVDA fails there.
Outcome shares
- An outcome share’s encoding is
10 * outcome + side. Its spot coin is#followed by the encoding. - Side
0is the first entry in the outcome’ssideSpecsand side1is the second. On a standard Yes or No market, Yes is side0. Use the names insideSpecswhen you show a market. - Sizes are whole shares.
- Collateral is USDC. No other token is needed.
- Recurring markets reuse the same display name. Build the label from the parsed metadata (underlying, target or thresholds, expiry) and not from
name.
Tips
- Read the balance as one number. Add the perp withdrawable amount and the spot USDC total from
get_account_summary, and report a single USDC balance. - Check the account mode once. If the mode is
defaultordisabledand there is perp USDC, callset_user_abstractionwithabstraction: 'u', then tell the user it was done. - Pick the time-in-force by intent.
Iocfor “buy now”,Gtconly when the user names a price,Alofor post-only,FrontendMarketfor HIP-3 stock perps. - Convert dollars to size yourself. Divide the dollar amount by the mid price and round to
szDecimals. - Relay collateral errors as given. An insufficient-funds rejection names the asset the market needs. A few HIP-3 dexes use USDH; get it by buying USDH with USDC on Hyperliquid spot.
ton a TWAP is different. Onplace_twap_order,tis a true or false flag for randomized timing andmis the duration in minutes.
Next
Hyperliquid
Funding, order types and limits in plain words.
Hyperliquid outcomes
How outcome markets work.

