Skip to main content
HyperCore is Hyperliquid’s native L1, the order book where trading, transfers, and account actions happen. It isn’t an EVM. Instead, every HyperCore action is a structured EIP-712 message signed with your account’s key and POSTed to the exchange API. There is no gas and no contract call. That makes HyperCore compatible with Dynamic embedded wallets out of the box. A Dynamic embedded wallet signs EIP-712 typed data exactly like any other EVM account, so @nktkas/hyperliquid can drive it with no extra infrastructure and no changes to how signing works.
HyperCore vs HyperEVM. HyperCore is the signed-action L1 covered here (trading, transfers, agent approvals). HyperEVM is a separate, standard EVM chain (Chain ID 999) for smart contracts. If you want to send EVM transactions or interact with contracts on HyperEVM instead, use the Hyperliquid SDK integration recipe.

Prerequisites

The wallet must be funded on HyperCore before it can trade or approve agents. Fund it through the Hyperliquid app (mainnet) or testnet app.

Install

npm install @nktkas/hyperliquid

Create the exchange client and place an order

Turn the embedded wallet account into a Viem WalletClient with createWalletClientForWalletAccount, then hand its account to the Hyperliquid ExchangeClient. It signs every HyperCore action with that account’s signTypedData.
import * as hl from '@nktkas/hyperliquid';
import { createWalletClientForWalletAccount } from '@dynamic-labs-sdk/evm/viem';

const placeOrder = async (walletAccount) => {
  // The embedded wallet's viem account signs the EIP-712 HyperCore action.
  const { account } = await createWalletClientForWalletAccount({
    walletAccount,
  });

  const exchangeClient = new hl.ExchangeClient({
    transport: new hl.HttpTransport(), // { isTestnet: true } for testnet
    wallet: account,
  });

  const result = await exchangeClient.order({
    orders: [
      {
        a: 0, // asset index (Hyperliquid universe index, e.g. 0 for BTC-USD perp)
        b: true, // is_buy
        p: '95000', // limit price
        s: '0.001', // size
        r: false, // reduce_only
        t: { limit: { tif: 'Gtc' } }, // good-'til-cancelled
      },
    ],
    grouping: 'na',
  });

  console.log('Order placed:', result);
  return result;
};

Read account state

Use an InfoClient with the wallet address to fetch balances and open positions.
import * as hl from '@nktkas/hyperliquid';

const getAccountState = async (address) => {
  const infoClient = new hl.InfoClient({ transport: new hl.HttpTransport() });
  const state = await infoClient.clearinghouseState({ user: address });

  console.log('Account value:', state.marginSummary.accountValue);
  return state;
};
Last modified on July 2, 2026