Skip to content
BuildBuild on HyperCore16 pages
Architecture: info, exchange, WebSocketFoundationHyperliquid's API has three surfaces: an unsigned read endpoint, a signed write endpoint, and a WebSocket that streams data and can carry both.Your first requestFoundationReading Hyperliquid needs no key, no account and no risk: three unsigned POST requests return the list of markets, an order book and any address's positions.Asset ids and namingPractitionerOrders name a market by an integer asset id and info requests by a coin string, and perps, spot, HIP-3 and outcomes each derive both by a different rule.Precision: tick size, lot size, significant figuresPractitionerA HyperCore price has at most 5 significant figures and a decimal cap set by szDecimals, a size at most szDecimals decimals, and outcomes use a 0.00001 grid.Signing from first principlesExpertL1 actions sign a keccak hash of their msgpack bytes, user-signed actions sign readable EIP-712 data, and one wrong byte in either recovers a stranger's address.Nonces, expiry and API walletsPractitionerHyperCore keeps each signer's 100 highest nonces and accepts a new one only if unused, above the smallest, and within 2 days before and 1 day after block time.Orders: place, modify, cancel, batch, dead man's switchPractitionerAn order is a signed action carrying a batch of compact orders; modify, cancel, TWAP and the dead man's switch are separate actions, each with its own response.Transfers and withdrawalsPractitionerEvery HyperCore transfer is a signed action: sends and withdrawals need the account's own key, and an API wallet's transfer actions keep value inside the account.Multi-sig actionsExpertA multi-sig action carries enough authorised users' signatures over one nonce and one named leader, in an envelope only the leader signs and submits.WebSocket: subscriptions, post requests, heartbeatsPractitionerOne WebSocket streams book, trade and account updates as blocks execute and carries signed actions, but drops without warning and forgets every subscription.Rate limits and user limitsPractitionerHyperliquid meters each IP by request weight, 1200 per minute, and each address by actions: 10,000 plus one per USDC traded.Priority fees and the activation feeExpertHyperliquid sells latency in two burned auctions, read priority per IP and write priority per order, and charges 1 quote token to activate a new account.Error responsesPractitionerHyperliquid reports errors at four layers, from HTTP status to a string inside a successful response, and several name a cause other than the real one.Debugging signatures and wire shapesExpertA signature over wrong bytes still verifies, so HyperCore recovers a stranger's address and says it does not exist; the fix is almost always the encoding.Optimising latencyExpertMost of an order's round trip is consensus; code wins by streaming reads, cutting serial round trips, using the fast order class and never stalling orders.Data: historical, node and explorerPractitionerThe API keeps only recent history; a full record needs pagination, archived node data or your own node, and each trade counted once by its trade id.
BuildBuild on the HyperEVM9 pages
What the HyperEVM is, and is notFoundationThe HyperEVM is Hyperliquid's smart contract environment: it reads HyperCore state and queues HyperCore actions, but never executes them atomically.Blocks, gas and RPCPractitionerThe HyperEVM produces small blocks every second and big blocks every minute, prices gas with EIP-1559 in HYPE, and serves a JSON-RPC with no historical state.Moving assets between HyperCore and the HyperEVMPractitionerLinked tokens cross between HyperCore and the HyperEVM via per-token system addresses, with a decimal offset and a 200k-gas fee when leaving HyperCore.Linking a tokenExpertLinking binds a HyperCore token to one ERC20 through the spot deployer's request and the contract deployer's finalisation; the protocol checks almost nothing else.Reading HyperCore: precompilesExpertRead precompiles are 21 fixed addresses, 0x800 to 0x814, that return HyperCore state as of the EVM block's construction, and only at the latest block.Writing to HyperCore: CoreWriterExpertCoreWriter turns a contract call into a HyperCore action for the caller's own account, run after the EVM block, with no result returned and no revert on refusal.Execution order and timingExpertEach L1 block runs the EVM block, then EVM to HyperCore transfers, then CoreWriter actions; on mainnet most actions land within half a second, vault transfers in about 4 s.PatternsExpertA contract that touches HyperCore stays solvent by recording an intent, sending the action, and settling only on HyperCore state that visibly moved.Footguns, measuredExpertTwelve ways a HyperEVM contract loses money or silently does nothing when it touches HyperCore, each with the on-chain evidence and the fix.

What the HyperEVM is, and is not

Foundation

The HyperEVM is Hyperliquid's smart contract environment: it reads HyperCore state and queues HyperCore actions, but never executes them atomically.

The HyperEVM connects Hyperliquid to the EVM ecosystem, on the same chain as HyperCore. It runs the Cancun hardfork without blobs, and the docs call it largely the same as Ethereum, so your tooling carries over.

It is the second execution environment, built within Hyperliquid’s execution, secured by HyperBFT. HyperCore’s books, margin, balances and settlement are protocol state nobody can deploy code to (HyperCore overview). Lending markets, tokenised vaults and custom tokens need code; here it runs on HyperCore’s liquidity, with no bridge or price relay.

The docs’ example: a lending protocol that prices collateral from HyperCore’s books and liquidates into them. On mainnet:

  1. It reads the collateral price through a precompile.
  2. The price is under its threshold, so it sends a sell order through CoreWriter (about 47k gas).
  3. HyperCore executes it 0.35 to 0.51 s after the EVM block.
  4. If HyperCore refuses it, the EVM transaction still succeeded.
Link Mechanism Page
Read Precompiles at 0x800 to 0x814 return HyperCore state (positions, balances, prices, lending, outcome status) as it stood when the EVM block was built precompiles
Write A call to CoreWriter emits a log; after the block, HyperCore executes the action (trade, transfer, stake, lending supply, outcome split) for the contract’s own HyperCore account CoreWriter
Move A token sent to its system address on one side is credited on the other moving assets
HYPEREVM Your contract runs inside the EVM block HYPERCORE Books, margin, balances all matching happens here read: precompiles, state at block build write: CoreWriter, queued, no result back move: system addresses, both directions
Reads are synchronous, as of block construction; writes are one way; tokens cross through per-token system addresses.
  • No matching. Order books live only in HyperCore.
  • No atomicity. The EVM transaction finishes first (most actions land within about half a second), so no EVM state can depend on the HyperCore result.
  • No reverts. The HyperEVM is never told. Every refusal returns success, gas is spent, a log is emitted and the money stays put.
  • No history. Precompiles answer only at the latest block, even on an archive node.
  • No multi-sig. CoreWriter does not work for multi-sig HyperCore users.
Parameter Value
Chain id 999 mainnet, 998 testnet
Gas token HYPE, 18 decimals on the HyperEVM
Small blocks every 1 s, 3M gas
Big blocks every 60 s, 30M gas
Read precompiles 0x800 to 0x814, 21 addresses, assigned on both networks
CoreWriter 0x3333333333333333333333333333333333333333, about 47k gas per basic call
Order sent from a contract executes 0.35 to 0.51 s after the EVM block (mainnet, n=52)
Vault transfer sent from a contract executes about 4.05 s after the EVM block (mainnet, n=6)
HyperCore to HyperEVM transfer 200k gas at the next EVM block’s base fee, charged on HyperCore

A HyperEVM token reaches HyperCore’s book only by crossing, and crossing back costs gas on the HyperCore side. HYPE crosses via 0x2222222222222222222222222222222222222222, other tokens via their own system address; the docs warn a non-HYPE token sent to the HYPE address is lost (moving assets).

An app trading for you places ordinary HyperCore orders from its own account.

Read in order: blocks, gas and RPC, moving assets, precompiles, CoreWriter, execution order, patterns, footguns.

For the concept, see Two execution environments; for the atomicity limit, see one transaction.