Relay supports depositing and withdrawing Hyperliquid (Hypercore) perpsUSDC from any supported chain. To try it today, use the Relay App. Relay also provides complete support for HyperEVM, which can be accessed using the standard quote flow withDocumentation Index
Fetch the complete documentation index at: https://docs.relay.link/llms.txt
Use this file to discover all available pages before exploring further.
chainId=999. This document details how to integrate Hyperliquid deposits and withdrawals into your application.
API Access
Hyperliquid can be accessed using the standard Relay API flow. To get started, review the execution steps documentation. When you’re ready to execute swaps, refer to the Get Quote API endpoint.Hyperliquid-Specific API Parameters
| Action | Parameter | Input | Description |
|---|---|---|---|
| Deposit to Hyperliquid | toChainId | 1337 | Hyperliquid Chain ID |
| recipient | Hyperliquid Address | ||
| Withdraw from Hyperliquid | protocolVersion | v2 | Required for withdrawals |
| fromChainId | 1337 | Hyperliquid Chain ID |
protocolVersion: v2 is mandatory for withdrawals.
Supported Currencies
Relay supports the following Hyperliquid currencies:- Perps USDC: Treated with a custom address
0x00000000000000000000000000000000 - Spot USDC: Address
0x6d1e7cde53ba9467b783cb7c530ce054 - Other Spot currencies: Including USDe, USDH, and other tokens returned by the Hyperliquid RPC
Currency Addresses
- Perps USDC is treated in a custom way with its address being
0x00000000000000000000000000000000 - For any other Spot currency the address is the tokenId value returned by the Hyperliquid RPC
- For currencies on HIP-3 DEXs (non-Spot and non-Perps), append the hex-encoded DEX name to the corresponding Spot currency address. For example,
USDCon thexyzDEX is represented as0x6d1e7cde53ba9467b783cb7c530ce05478797a, where0x6d1e7cde53ba9467b783cb7c530ce054is the Spot USDC address and78797ais the hex representation of “xyz”.
Withdrawals from Hyperliquid
Hyperliquid withdrawals use a two-step signature flow. The v2 implementation leverages the unique nonce associated with every Hyperliquid transfer to map deposits to request IDs. This requires two signatures:- Authorize: Sign a nonce-mapping message that associates a specific nonce with a request ID
- Deposit: Sign and submit the Hyperliquid transfer transaction using the same nonce
Getting Hyperliquid Balances
Use the Hyperliquid info API to query balances. PassclearinghouseState as the type parameter, then read the withdrawable property, which returns a USD value in human-readable format.
Example Quote Request
Step 1: Authorize (Nonce-Mapping Signature)
The first step (id: authorize) requires signing an EIP-712 message that maps the nonce to the request ID. This signature can be executed on any EVM chain.
Chain ID Override Recommended: The
signatureChainId and domain.chainId fields are used for EIP-712 signature authorization only — they do not affect fund routing. The destinationChainId in your quote request determines where funds are delivered. The API returns Ethereum mainnet (chainId: 1) by default. We recommend overriding both item.data.sign.domain.chainId and item.data.post.body.signatureChainId to match the user’s active chain ID (Base, Optimism, etc.) for wallet and signature correctness.Authorize Step
post body to the endpoint provided in the post data. You’ll also need to provide the signature that was generated from the sign data as a query parameter.
Step 2: Deposit (Hyperliquid Transaction)
The second step (id: deposit) requires signing and submitting the actual Hyperliquid transfer. The API response includes eip712Types and eip712PrimaryType to simplify constructing the signature data.
Example deposit step response:
Deposit Step
Constructing the Signature Data
To sign the deposit step, you need to convert it into EIP-712 signature data. Extract the necessary fields from the step response and construct the signature object:domain: Static except forchainId, which should match the connected wallet’s active chaintypes: Combines the API-providedeip712Typeswith the standardEIP712DomainprimaryType: Use theeip712PrimaryTypefrom the API responsemessage: Spread the action parameters and addtypeandsignatureChainIdsignatureChainId: Hex representation of the active chain ID
Signing the Message
Use your wallet client to sign the EIP-712 typed data:Submitting to Hyperliquid
After signing, submit the transaction to Hyperliquid’s exchange API:- Parse the signature into its component parts (
r,s,v) - Ensure
vis aNumber, not aBigInt - The action data must exactly match what was signed
- A successful response returns status
200withdata.status: "ok"