Skip to content

Testnet ​

Available environments ​

Hyperliquid provides mainnet and Testnet. This SDK does not expose a separate demo-trading mode. Mainnet is the default.

Testnet ​

Set testnet: true on each RestClient, WebsocketClient and WebsocketAPIClient you use:

ts
import { RestClient, WebsocketClient } from '@siebly/hyperliquid-api';

// Public clients only. No requests, subscriptions or signed actions are sent.
export const rest = new RestClient({ testnet: true });
export const ws = new WebsocketClient({ testnet: true });

This example constructs public clients without sending requests or signing actions. The option selects both network routing and the signing network for authenticated actions. Changing only a URL is not sufficient to configure signed Testnet actions correctly.

Wallets and account access ​

Hyperliquid uses wallet signing rather than an exchange API key/secret pair. For authenticated calls, configure a server-side privateKey or external signer. If using an API/agent wallet, approve it on the selected network. Query account state with the master account address, not the agent wallet address; use accountAddress where required by your integration. Follow Authentication and Hyperliquid's API wallet guidance.

Coverage and limitations ​

Testnet has its own balances, markets and activity. Do not assume symbols, asset identifiers or account state are identical across networks. Check the selected network's metadata before creating an order.

Read the current Testnet faucet eligibility rules before expecting test funds; a new wallet is not automatically eligible. Email-login wallets can also differ between networks. See the official API and WebSocket documentation for network endpoints.

What these environments can prove ​

Use test environments to check request formats, credentials, order handling and reconnect recovery within the features they support. Testnet liquidity, prices, fills, fees and availability can differ substantially from production. Accounts, balances and order history may also be reset.

Testnet is not a reliable place to evaluate strategy performance. Demo trading may use production market data, but simulated fills do not establish live profitability, slippage, execution quality or capacity. Treat both as integration tests, not evidence that a strategy will succeed with real funds. See the CEX testnet overview for the distinction between testnet and demo trading.

Before switching environments ​

  • Keep credentials and configuration separate for each account, product and environment. Never fall back to live credentials when a test key is missing.
  • Configure every REST, subscription and WebSocket API client separately. Changing one client does not reconfigure another.
  • Check the selected environment's supported endpoints and instruments before sending a request. Similar method signatures do not imply identical availability.
  • Keep authenticated requests on your server. Confirm the destination and account before enabling any write operation.

Production remains the default. Selecting a test environment is an explicit choice for each client; it is not a global SDK setting.

Configuration · Authentication · Production usage

Built by Siebly. Open source SDKs for exchange APIs.