factor_hl_close_position
Close or reduce a HyperLiquid perpetual position in USD through a Factor vault on HyperEVM (chain 999). Handles main-dex symbols on-chain and HIP-3 builder-dex symbols via the HL Exchange API.
Instructions
Reduce / close a HyperLiquid perp position (reduce-only order) sized in USD through a Factor vault. HyperEVM (chain 999) only. Main-dex symbols (BTC, ETH, ...) route on-chain; HIP-3 builder-dex symbols (xyz:GOLD, xyz:BRENTOIL, ...) route off-chain via the HL Exchange API.
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>",
"perp": "<perp>",
"sizeUsd": "<sizeUsd>"
},
"name": "factor_hl_close_position"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| perp | Yes | Perp symbol. Main dex: "ETH", "BTC", "SOL". Builder dex (HIP-3): "xyz:GOLD", "xyz:BRENTOIL", ... | |
| vault | Yes | Vault contract address. | |
| sizeUsd | Yes | Notional USD to close (reduce-only). | |
| password | No | Wallet password if encrypted. | |
| slippageBps | No | Max slippage in bps. Default 1000. |