Community Docs
  • 🏠Home
  • Getting Started
  • Introduction
    • What is Hyperliquid?
    • Hyperliquid Labs
    • Roadmap
      • 2025-26-03_Incident
  • Architecture
    • Overview
    • HyperBFT
      • API Servers
    • HyperCore
      • Dex
        • Clearinghouse
          • Margin Management
          • Liquidations
          • Funding
          • Fees
        • Order Book
        • Oracle
      • Vault
      • HIPs
        • Spot Deployments (HIP-1/HIP-2)
      • Bridge
    • HyperEVM
    • Hyperliquid.
      • Unit
  • Guide
    • User Guide
      • Onboarding
      • Spot Deployments
      • Airdrop
    • Builder Guide
      • HyperCore
        • Trading Bot
        • Builder Codes
          • Install Template
          • Update
        • Endpoints
          • Info
            • Spot
            • Perpetuals
          • Exchange
      • HyperEVM
        • EVM Basics
          • dApp Setup
        • Specificities
      • Node Operators
      • Historical Data
  • Ecosystem
    • The Hyper Liquidated
      • Community Map
    • Projects
      • Tools
      • HyperEVM
        • Felix
      • HyperCore
      • MemeCoin
Powered by GitBook
On this page
  1. Guide
  2. Builder Guide
  3. HyperCore

Endpoints

PreviousUpdateNextInfo

Last updated 2 months ago

Hyperliquid provides both REST and WebSocket endpoints for accessing market data and executing trades.

  1. Base URLs

    • HTTPS (REST API)

      • Mainnet: https://api.hyperliquid.xyz

      • Testnet: https://api.hyperliquid-testnet.xyz

    • WebSocket (WSS)

      • Mainnet: wss://api.hyperliquid.xyz/ws

      • Testnet: wss://api.hyperliquid-testnet.xyz/ws

  2. API Endpoints Overview

    • /info Endpoint Provides various types of market and system information, classified into three categories:

      • : General data.

      • : Perpetual futures market data.

      • : Spot market data.

    • /exchange Endpoint Handles order execution and trading-related operations.

📌 Resources

  1. Integration with CCXT (Less flexible):

  2. Testing Exchange Endpoint

    • Use the Hyperliquid Python SDK:

  3. Testing Info Endpoint in Postman:


🔹 API Specificities

  • Notation

    The Hyperliquid v0 API uses a custom notation for some parameters. Key abbreviations:

    • Px → Price

    • Sz → Size (in base currency)

    • Szi → Signed size (+ for long, - for short)

    • Ntl → Notional value (USD amount, Px * Sz)

    • Side → Trade/book side (B = Bid/Buy, A = Ask/Sell)

    • Tif → Time in force (GTC, ALO, IOC)

  • Tick & Lot Size

    • Prices have a maximum of 5 significant figures but must respect decimal limits:

      • Perps: MAX_DECIMALS = 6

      • Spot: MAX_DECIMALS = 8

    • Sizes are rounded based on szDecimals for each asset.

    • To check szDecimals, query the meta request in the /info endpoint.

  • Agent (API) Wallets & Nonce

    • API wallets (agent wallets) can sign transactions on behalf of a master or sub-account. However:

      • API wallets only sign transactions; queries require the actual account address.

      • Nonces are required to prevent replay attacks.

      • Each API wallet tracks its own nonce state.

    • Nonces & Transaction Ordering

      • Hyperliquid L1 stores the 100 highest nonces per address.

      • Each new transaction must have a nonce greater than the smallest stored nonce and must not be reused.

      • Nonces expire after 1 day from the L1 block timestamp.

    • Best Practices for API Wallets

      • Do not reuse API wallet addresses after deregistration. Generate a new wallet to avoid nonce pruning issues.

        • If using multiple subaccounts, assign separate API wallets to each one.

        • Market makers should batch orders & cancels every 0.1 seconds, keeping IOC/GTC orders separate from ALO orders for prioritization.

  • Error Responses

    Errors are returned as a vector for batched requests or as a single error if the entire batch is invalid.

    • Order Errors: Tick size violation, insufficient margin, minimum order value ($10), reduce-only violations, invalid TP/SL price, no market liquidity.

    • Cancel Errors: Order not found (never placed, already canceled, or filled).

    • Pre-validation Errors: Affect entire batch (e.g., empty request, invalid tick size) and return a single response.

  • Rate Limits

    API usage is limited per IP and L1 address:

    • REST API (Per IP): 1200 requests/minute, request weight varies (1+ for batched orders, up to 40 for explorer API).

    • WebSocket: 100 connections, 1000 subscriptions, 2000 messages/min.

    • L1 Address Limits:

      • 1 request per 1 USDC traded since inception.

      • Initial buffer: 10,000 requests.

      • Cancels have a higher limit to ensure orders can still be canceled.

      • Batched requests count once for IP limits but as n requests for L1 limits.

📌 Full details:

📌 Full details:

📌 Full details:

📌 More details:

📌 More details:

General
Perpetuals
Spot
CCXT Docs
Hyperliquid Python SDK
API Notation
Tick & Lot Size
Agent Wallets & Nonces
Error Responses
Rate Limits
23KB
Solynor_hl-info.postman_collection.json