The trading terminal
Markets
BTC, ETH and HYPE from Hyperliquid's main perp dex, and NVDA, AMD, TSM, AVGO, MU, INTC, ARM, ASML, SNDK, CRWV and TSLA from the xyz dex, a HIP-3 builder-deployed perp dex on Hyperliquid. Asset ids follow the Hyperliquid docs: the index in meta for the main dex, 100000 + dex_index × 10000 + index for a HIP-3 dex. Prices stream from allMids and the book from l2Book over Hyperliquid's websocket.
Account view
Positions, open orders and fills of the connected address, or of any address you paste, from the info API (clearinghouseState for the main dex and the xyz dex, frontendOpenOrders, userFills). Margin on a HIP-3 dex is held in that dex: move USDC to it on Hyperliquid before trading the equity perps.
Signing
Two user-signed actions go through your wallet with EIP-712 domain HyperliquidSignTransaction: ApproveBuilderFee and ApproveAgent. Orders and cancels are L1 actions: msgpack of the action, the nonce and the vault flag, hashed with keccak256 into a phantom Agent message under domain Exchange, chain id 1337, signed in your browser by the approved API wallet. Market orders are IOC limits 3% through the mid. Prices are sent with at most five significant figures and six minus szDecimals decimals.