Actions33
- Order Actions
- Position Actions
- Account Actions
- Market Data Actions
Position → Close Position
AI-generatedSummary
Closes an open position on a builder-deployed HIP-3 perpetual by submitting a reduce-only, immediate-or-cancel market order priced using the current mid price and configured slippage tolerance. The asset is scoped to the DEX configured in the credentials.
Inputs
- Asset Symbol (required) — Symbol without a DEX prefix, such as XYZ100. The node adds the credential DEX prefix and looks up the matching open position.
- Slippage % (required) — Maximum slippage tolerance for the close order; defaults to 0.5% and accepts values from 0.1% to 10%.
Output shape
A single result object per input item containing the Hyperliquid exchange response for the close order.
Fails if no open position exists for the asset or no mid price is available. The node closes the full position size and chooses the opposite order side based on whether the position is long or short. With Continue On Fail enabled, errors are returned as an object with an error field.