allMids | Hyperliquid Info API
Info API
allMids | Hyperliquid Info API
Hyperliquid allMids: fetch the current mid price for every actively traded asset in a single call.
POST
allMids | Hyperliquid Info API
Credit Cost
1 per call
Processing
Realtime
type: "allMids" is used to fetch the current mid price for every actively traded asset in a single call.
- Wire-equal to
POST api.hyperliquid.xyz/infowith{"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
dexfield 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.
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.