Skip to main content
POST
allMids | Hyperliquid Info API

Credit Cost

1 per call

Processing

Realtime
The Hyperliquid info endpoint with type: "allMids" is used to fetch the current mid price for every actively traded asset in a single call.
Estimate your monthly cost for this API using the Pricing Calculator.
  • Wire-equal to POST api.hyperliquid.xyz/info with {"type": "allMids"}.
  • The response is a flat map keyed by asset. Perp assets use their symbol (e.g. BTC); spot pairs are keyed as @<index> using the spot pair index from spotMeta.
  • The optional dex field takes a perp DEX name. It defaults to the empty string, which represents the first (native) perp DEX; pass a HIP-3 dex name to scope mids to that dex.
  • Mid prices are returned as decimal strings - keep them as strings or use a fixed-precision decimal type rather than parsing as floats.
Returns the current mid price for every actively traded asset in one call. The mid price is the midpoint between the best bid and the best ask. The payload is a single JSON object mapping each asset key to its mid price as a decimal string. This is a global, non-user-keyed type. Perp assets are keyed by their symbol (for example BTC); spot pairs are keyed as @<index>, using the spot pair index from spotMeta.

Endpoint

Request

string
default:"allMids"
required
Always "allMids".
string
HIP-3 builder DEX identifier. Empty string (default) returns mids for the first (native) perp DEX. Pass a builder code (e.g. "xyz") to scope mids to a HIP-3 deployer’s perp DEX.

Example

Response

A JSON object mapping each asset key to its mid price as a decimal string.

Field descriptions

All mid prices are returned as decimal strings, preserving upstream precision. Do not parse them as floats - keep them as strings or use a fixed-precision decimal type.
string
Mid price for the asset, as a decimal string. Perp assets are keyed by symbol (e.g. BTC, ETH); spot pairs are keyed as @<index> using the spot pair index from spotMeta.
Last reviewed: 2026-07-24