Close & Cancel

Close open positions and cancel pending orders.


Overview

Knowing how to exit is just as important as knowing how to enter. Whether you're taking profits, cutting losses, or cleaning up stale orders, Close & Cancel gives you full control over unwinding your trades on Hyperliquid.

What you can do:

  • Close individual positions or all positions at once

  • Cancel specific orders or all pending orders

  • Partially close positions to take profits while staying in the trade

  • Clean up orphaned orders after closing positions


Closing Positions

Closing a position exits your trade at market price. Your unrealized PnL becomes realized PnL and the margin is freed back to your account.

Close a Specific Position

Prompt
Interpretation

"Close my BTC position"

Closes BTC long or short at market price

"Exit my ETH short"

Closes ETH short position

"Close SOL"

Closes SOL position

"Get out of my DOGE position"

Closes DOGE at market

"Flatten BTC"

Closes BTC position entirely

Close All Positions

Prompt
Interpretation

"Close all positions"

Closes every open position at market price

"Flatten everything"

Same, exits all positions

"Close all my perps"

Closes all perpetual positions

"Exit all trades"

Closes everything at market

circle-exclamation

Partial Closes

You don't have to close an entire position. You can take partial profits or reduce size while keeping the rest open.

Prompt
Interpretation

"Close half my BTC position"

Closes 50% of BTC at market

"Close $500 of my ETH long"

Reduces ETH position by $500

"Take profit on 25% of my SOL"

Closes a quarter of SOL position

"Reduce my BTC position by $2,000"

Reduces notional by $2,000

"Scale out of ETH, close a third"

Closes ~33% of ETH position

Partial closes are useful for:

  • Taking profits while staying in - Lock in gains on part of the position

  • Reducing risk - Lower your exposure without fully exiting

  • Scaling out - Gradually exit a winning trade at different levels


Cancelling Orders

Cancel pending orders that haven't executed yet. This includes limit orders, stop-losses, take-profits, and conditional orders.

Cancel Orders for a Specific Asset

Prompt
Interpretation

"Cancel my ETH orders"

Cancels all pending orders on ETH

"Cancel my BTC limit order"

Cancels the BTC limit order

"Remove my SOL stop-loss"

Cancels the SOL stop-loss order

"Cancel the take-profit on my ETH position"

Removes the ETH TP order

"Delete my pending DOGE orders"

Cancels all DOGE orders

Cancel All Orders

Prompt
Interpretation

"Cancel all orders"

Cancels every pending order across all assets

"Cancel all my open orders"

Same, clears all pending orders

"Remove all pending orders"

Cancels everything


Close + Cancel Together

When you close a position, any attached TP/SL orders don't automatically cancel. You'll want to clean those up to avoid them triggering and accidentally opening a new position.

Prompt
Interpretation

"Close my BTC position and cancel all BTC orders"

Exits position and cleans up orders

"Flatten ETH and remove all ETH orders"

Closes position and cancels pending orders

"Close everything and cancel all orders"

Nuclear option, exits all positions and cancels all orders

Why This Matters


Emergency Exit

If the market is moving fast and you need to get out of everything immediately:

Prompt
Interpretation

"Close all positions and cancel all orders"

Exits everything, cancels everything

"Emergency exit, flatten everything"

Closes all positions at market

"Get me out of everything right now"

Full liquidation of all positions and orders

This sends market orders to close every open position and cancels all pending orders. It's the fastest way to go fully flat.


What Happens When You Close

When a position is closed:

  1. Market order sent - Your position is closed at the best available price

  2. Fill generated - A "Close Long" or "Close Short" fill appears in your trade history

  3. PnL realized - Unrealized PnL becomes realized, added to your account balance

  4. Margin freed - The collateral backing the position returns to your free margin

PnL Calculation


Common Workflows

Taking Partial Profits

Cutting Losses

End of Day Cleanup


Pro Tips

  1. Always cancel orders after manual closes - Orphaned TP/SL orders can open unintended positions

  2. Use partial closes to manage winners - Don't be binary, scale out gradually

  3. Check the order book before closing large positions - Thin liquidity means more slippage

  4. Close and cancel together - Make it a habit to say "close position and cancel orders" in one command

  5. Keep a closing checklist - Position closed? Orders cancelled? PnL recorded? Margin freed?

  6. Don't panic close in volatile markets - If you have a stop-loss set, let it do its job


Last updated