Skip to Content
Supported ChainsHyperliquid
Supported ChainHyperliquid

Hyperliquid API

Access Hyperliquid via the Spectrum unified API. Hyperliquid is a high-performance EVM Layer 1 purpose-built for perpetual trading, offering ultra-low latency and high throughput.

Properties

PropertyValue
Slughyperliquid
TypeEVM
Native TokenHYPE

Available Methods

MethodDescription
getBlockHeightLatest Hyperliquid block number
getBalanceHYPE balance for a wallet
getTokenBalanceERC-20 token balance
getTokenMetadataERC-20 token info
getTokenAllowanceToken spending allowance
getPortfolioFull portfolio with USD values
getNftCollectionNFT holdings for a wallet
getBlockTransactionsTransactions in a block
estimateGasGas estimation for a transaction
traceTransactionInternal call trace
getHistoricalBalanceBalance at a historical block
getCodeContract bytecode check
simulateCallSimulate a contract call
rpcProxyRaw JSON-RPC passthrough
getChainHealthHyperliquid RPC health check

Quick Start

Get the latest Hyperliquid block height:

curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_KEY" \
{
  "jsonrpc": "2.0",
  "method": "getBlockHeight",
  "params": {
    "chain": "hyperliquid"
  },
  "id": 1
}

Get Balance

Retrieve the HYPE balance for a wallet address:

curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_KEY" \
{
  "jsonrpc": "2.0",
  "method": "getBalance",
  "params": {
    "chain": "hyperliquid",
    "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
  },
  "id": 1
}

Get Gas

Compare current gas prices across chains:

curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_KEY" \
{
  "jsonrpc": "2.0",
  "method": "compareGas",
  "params": {},
  "id": 1
}

SDK

import { Spectrum } from '@spectrum-nodes/sdk'; const spectrum = new Spectrum({ api: 'https://your-endpoint.simplystaking.xyz/YOUR_API_KEY/' }); // Get latest block height const block = await spectrum.core.getBlockHeight('hyperliquid'); console.log(block.height); // Get HYPE balance const balance = await spectrum.tokens.getBalance('hyperliquid', '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'); console.log(balance.balance);

DeFi

Hyperliquid is supported by the following DeFi protocols on Spectrum:

  • HyperLend — lending and borrowing on Hyperliquid
// Get HyperLend lending yields on Hyperliquid const yields = await spectrum.yields.getLending({ chain: 'hyperliquid', protocol: 'hyperlend' });

Hypercore

For direct access to Hyperliquid’s L1 state machine (order book, clearinghouse, vaults, staking, HIP-3 oracle), see the dedicated Hyperliquid Hypercore page.