HyperCore Trade
Zero-custody builder API for HyperLiquid.
Sign locally, we forward. Your keys never leave your machine.
How it works
Every trade follows the same three-step pattern. Use hl_openOrders and hl_orderStatus to discover orders and get pre-built cancel actions.
Build
hl_build*
We compute the hash with the builder fee injected
Sign
Your key
Sign the hash locally. Your private key never leaves
Send
hl_send*
We forward the signed transaction to HyperLiquid
Quickstart
Clone the repo. Set your key. Run.
https://send.hypercoretrade.xyzhypercore-trade-examples
Clone and run. Full working examples in Python, TypeScript, and Rust.
1git clone https://github.com/quiknode-labs/hypercore-trade-examples.git2cd hypercore-trade-examples/python3pip install -r requirements.txt4export PRIVATE_KEY="0xYOUR_PRIVATE_KEY"5 6python3 approve.py # one-time builder fee approval7python3 check_status.py # check approval status8python3 list_markets.py # list all available markets9python3 open_orders.py # view open orders + cancel actions10python3 order_status.py # check what happened to an order11python3 place_order.py # place a perp order12python3 cancel_order.py # place + cancel13python3 modify_order.py # place + modify14python3 roundtrip.py # buy then sell (full cycle)15python3 hip3_order.py # HIP-3 market order by name16python3 revoke.py # revoke approvalTry it now
1curl -s -X POST https://send.hypercoretrade.xyz \2 -H "Content-Type: application/json" \3 -d '{4 "jsonrpc": "2.0",5 "id": 1,6 "method": "hl_getMaxBuilderFee",7 "params": { "user": "0xYOUR_ADDRESS" }8 }'API Reference
16 methods, all JSON-RPC 2.0. Click any method to expand.
Approval
Orders
Utility
Error Codes
Every error includes code, message, and data.guidance with exactly what to do next.
| Code | Meaning |
|---|---|
| -32001 | Not approved / fee too low |
| -32002 | Builder mismatch |
| -32003 | Invalid signature |
| -32010 | Exchange rejection |
| -32602 | Invalid params |
| -32603 | Internal error |
| -32700 | Parse error |
Fees
Two fees apply per trade: our builder fee (injected into your order) and HyperLiquid's exchange fee (maker/taker, charged by the protocol).
| Market | Fee | Protocol Max |
|---|---|---|
| Perpetuals | 0.04% | 0.1% |
| Spot | 0.5% | 1% |
| Market | Taker | Maker |
|---|---|---|
| Perpetuals | 0.045% | 0.015% |
| Spot | 0.070% | 0.040% |
You approve a maxFeeRate ceiling (e.g. "1%") for the builder fee. The actual builder fee is always within your approved limit. You can revoke at any time.