Vault Development · Vault Fundamentals · 2/7
Creating a Vault
Vault Creation via the UI
Vaults are created through the Hyperliquid web interface:
- Navigate to the Vaults section
- Click "Create Vault"
- Enter a name and description (these cannot be changed later)
- Deposit at least 100 USDC as the vault leader
As of October 2026, creating a vault also costs a 10,000 USDC fee, and the leader must keep at least 5% of the vault at all times (vault leader docs). Check the docs for the current numbers before you start.
What About the API?
The official Python SDK (hyperliquid-python-sdk) has no vault-creation helper, and the public exchange endpoint docs do not document a vault-creation action. Treat creation as a one-time UI step; everything after that (deposits, trading, monitoring) can be done through the API.
Vault Address
Every vault gets a unique address (similar to a wallet address). This address:
- Holds the vault's USDC deposits
- Is the account that positions are opened under
- Is used for all trading operations
A vault has no private key. Actions for the vault are signed by the leader (or the leader's API wallet) with the vaultAddress field set to the vault (exchange endpoint docs).
Depositing More as the Leader
The leader's first deposit happens during creation. Later deposits and withdrawals use a vault transfer. The usd amount is an integer in micro-USDC (1 USDC = 1,000,000):
# Testnet only — never hard-code real keys
import eth_account
from hyperliquid.exchange import Exchange
from hyperliquid.utils import constants
leader = eth_account.Account.from_key("<TESTNET_LEADER_KEY>")
exchange = Exchange(leader, base_url=constants.TESTNET_API_URL)
vault_address = "0xYourVaultAddress"
exchange.vault_usd_transfer(vault_address, True, 1_000_000_000) # deposit 1,000 USDC
Delegate Trading with an API Wallet
Instead of using the vault leader's wallet directly for every trade, the leader approves an API wallet (also called an agent wallet) — a separate key that can sign trading actions. The SDK generates the agent key for you:
# The leader (master account) approves a new API wallet.
# Do not call this from an agent — agents cannot approve agents.
approve_result, agent_key = exchange.approve_agent("keeper")
The approved agent can then trade for the vault by creating an Exchange with vault_address set:
# Testnet only — the agent key should live only on the keeper server
agent_wallet = eth_account.Account.from_key(agent_key)
vault_exchange = Exchange(agent_wallet, constants.TESTNET_API_URL,
vault_address=vault_address)
# Every action from vault_exchange is signed with vaultAddress = vault_address
result = vault_exchange.order("BTC", True, 0.01, 90000.0,
{"limit": {"tif": "Gtc"}})
Why Use API Wallets?
- Security — The vault leader's wallet (which can withdraw) stays in cold storage
- Automation — The agent key lives on the keeper server
- Separation of Concerns — Trading key vs admin key
- Nonces — Nonces are tracked per signer, so use one API wallet per trading process (nonces and API wallets)
If the agent key is compromised, the attacker can trade but cannot transfer or withdraw funds. Bad trades can still lose the vault's entire equity, so treat the agent key as sensitive. Do not reuse an agent address after deregistering it: its nonce state may be pruned, which can let old signed actions be replayed.