factor_hl_compile_open
Compile a non-broadcast BatchPlan for opening a HyperLiquid perp position, including ordered EVM and HL operations, warnings, blockers, and margin, notional, and liquidation estimates.
Instructions
Compile (do NOT broadcast) a BatchPlan for opening a HyperLiquid perp position. Returns ordered EVM + HL Exchange ops, structured warnings / blockers, and margin/notional/liquidation estimates. Use factor_hl_open_position to actually execute. HyperEVM (chain 999) only.
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": {
"vault": "<vault>",
"instrumentId": "<instrumentId>",
"sizeUsd": "<sizeUsd>",
"isLong": "<isLong>"
},
"name": "factor_hl_compile_open"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vault | Yes | Vault contract address (HyperEVM). | |
| isLong | Yes | true = long, false = short. | |
| sizeUsd | Yes | Notional size in USD (must be ≥ HL min notional = $10). | |
| leverage | No | Target leverage. Must be ≤ instrument.maxLeverage. | |
| slippageBps | No | Max IOC slippage in basis points (0-10000). | |
| instrumentId | Yes | Catalog id ("perp:main:BTC", "perp:xyz:BRENTOIL"), qualifiedSymbol, or bare ticker. |