HyperEVM vs HyperCore. This recipe targets HyperEVM (Chain ID
999): switch the wallet to that chain and pass a viem WalletClient into Hyperliquid’s ExchangeClient. For HyperCore (EIP-712 signed L1 actions with an embedded wallet, no chain switch), see HyperCore with embedded wallets.This recipe uses the Dynamic JavaScript SDK (
@dynamic-labs-sdk/client + @dynamic-labs-sdk/evm). The React tabs below also use @dynamic-labs-sdk/react-hooks. See the Quickstart for the base setup (or the React Quickstart, with QueryClientProvider outside DynamicProvider).Prerequisites
Before integrating Hyperliquid with Dynamic, ensure you have:- The Dynamic JavaScript SDK wired up (
@dynamic-labs-sdk/client+@dynamic-labs-sdk/evm) — for the React tabs, also@dynamic-labs-sdk/react-hookswithQueryClientProvideroutside<DynamicProvider>at the root - 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 — covered in the installation section below
- For the smart wallet path only: the ZeroDev extension (
@dynamic-labs-sdk/zerodev)
Installation
Install the Hyperliquid SDK in your project:- npm
- yarn
- pnpm
- expo
Creating the Hyperliquid Exchange Client
Hyperliquid’sExchangeClient needs a viem WalletClient for signing. The JS SDK gives you one via createWalletClientForWalletAccount (and via getSignerForSmartWalletAccount for ZeroDev smart wallets). Switch the wallet’s active chain to Hyperliquid (networkId: '999') first so signatures target the right chain.
Standard EVM Wallet Integration
- JavaScript
- React
Smart Wallet Integration
For smart wallets using account abstraction, Hyperliquid still needs to sign with the underlying EOA. UsegetSignerForSmartWalletAccount from @dynamic-labs-sdk/zerodev to get a viem WalletClient bound to the EOA:
- JavaScript
- React
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