Hyperliquid Close Position logo

Catalog action Hyperliquid wallet

Close an open perpetual position on Hyperliquid by placing a reduce-only IOC order at market price with slippage. Automatically determines side and size from current position. Ideal for: stop-loss execution, taking profits, and emergency position exits.

This action can require a wallet connector, gas, token movement, or an external side effect. Test with simulation or a controlled amount before using it in a live workflow.

At a Glance

FieldValue
Action IDhyperliquid-close-position
CategoryHyperliquid
Connectorwallet
Requires gasNo
Funds movementNone declared
Tagshyperliquid, perps, position, trade, trading

Payload Schema

FieldTypeRequiredDescription
dexstringNoHIP-3 DEX name for TradFi markets. Omit for standard crypto perps. xyz = trade.xyz (stocks, indices, commodities), flx = flx.finance, vntl = vntl.exchange
coinstringYesAsset symbol to close position for (e.g., BTC, ETH for crypto; TSLA, SP500 for HIP-3 DEX)
slippageBpsnumberNoSlippage tolerance in basis points (default 100 = 1%). Price is adjusted from mid to ensure fill.

Result Schema

FieldTypeRequiredDescription
statusstringYesClose outcome
coinstringNoAsset symbol
closedSizestringNoSize that was closed
avgPricestringNoAverage fill price
sidestringNoSide of the closing order (buy to close short, sell to close long)
oidnumberNoHyperliquid order ID

Examples

json
{ "type": "hyperliquid-close-position", "payload": { "coin": "example-coin" }, "children": [], "connector": { "type": "wallet", "id": "conn_wallet" }}

Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.

Ask a question... ⌘I