Buy $LEVER
Leverra Docs
Developers

Hyperliquid signing

How the terminal talks to Hyperliquid.

The browser calls Hyperliquid's API directly (api.hyperliquid.xyz, or the testnet API). Leverra's worker never sees an order.

  • approveAgent: an EIP-712 user-signed action from your wallet (domain HyperliquidSignTransaction), naming the agent address and the agent name Leverra.
  • Orders, cancels and updateLeverage: L1 actions msgpack-encoded and signed by the agent key, sent to /exchange.
  • A TP / SL bundle is one order action whose orders are the entry plus trigger orders, with grouping normalTpsl.
  • Reads (markets, account, orders, fills, candles, portfolio, funding) use /info; book, trades, candles and the ticker stream over WebSocket.

Signing is implemented with viem and @msgpack/msgpack. The open SDK that packages this for firms, bots and dashboards is in progress.