Prerequisites
Before integrating Hyperliquid with Dynamic, ensure you have:- Dynamic SDK version v4
- Hyperliquid chain enabled in Dynamic dashboard - Enable the Hyperliquid chain (Chain ID: 999) in your Dynamic dashboard under the EVM chains section
- Hyperliquid SDK installed - We’ll cover this in the installation section
Installation
Install the Hyperliquid SDK in your project:Creating the Hyperliquid Exchange Client
The Hyperliquid SDK’sExchangeClient
is the main interface for trading operations. It requires a wallet instance that can sign transactions.
Standard EVM Wallet Integration
For standard EVM wallets connected through Dynamic, use the Viem extension to create a wallet client:Smart Wallet Integration
For smart wallets using account abstraction, you need to access the underlying EOA (Externally Owned Account) wallet for signing:What You Can Do Next
Once you have created the Hyperliquid exchange client, you can access the full range of trading and account management features:Trading Operations
- Place Orders: Market orders, limit orders, and stop orders
- Cancel Orders: Cancel individual or all orders
- Modify Orders: Update existing order parameters