Trade perpetuals
Open, modify, and close perpetual positions on Hyperliquid through the mm perps commands.
Prerequisites
- Quickstart completed
- USDC on a supported source chain for the initial deposit
First-time setup
-
List venues:
mm perps list-venues -
Deposit USDC into the venue before your first trade:
mm perps deposit --venue hyperliquid --amount <AMOUNT> -
Confirm your perps balance:
mm perps balance --venue hyperliquid
Open a position
-
List markets:
mm perps markets --venue hyperliquid -
Get a quote:
mm perps quote --venue hyperliquid --symbol <SYMBOL> --side long --size <SIZE> --leverage <N> -
Open the position:
mm perps open --venue hyperliquid --symbol <SYMBOL> --side long --size <SIZE> --leverage <N>
Close or modify a position
mm perps close --venue hyperliquid --symbol <SYMBOL>
mm perps modify --venue hyperliquid --symbol <SYMBOL> --leverage <N>
Common pitfalls
Deposit before you trade
The Hyperliquid sub-account is empty on first use. Running mm perps open before depositing can
fail with:
PerpsRuntimeError: User or API Wallet does not exist
Deposit USDC with mm perps deposit --amount <N> before opening your first position.
Related commands
See mm perps in the commands reference.