hl_build_order
Build a ready Hyperliquid perpetual order action with SwapTitan builder code injected (minimal 0.001% fee). Non-custodial: returns the action + nonce to sign with your own wallet (EIP-712) and POST to https://api.hyperliquid.xyz/exchange. Call hl_approve first (once).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"coin": "<coin>",
"isBuy": "<isBuy>",
"sz": "<sz>",
"limitPx": "<limitPx>"
},
"name": "hl_build_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sz | Yes | Order size in coin units | |
| tif | No | Time-in-force, default Gtc | |
| coin | Yes | Market, e.g. BTC, ETH, SOL | |
| isBuy | Yes | true=long/buy, false=short/sell | |
| limitPx | Yes | Limit price | |
| reduceOnly | No | Optional |