You can only use this endpoint on the official Hyperliquid public API. It is not available through Chainstack, as the open-source node implementation does not support it yet.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
type
(string, required) — Must be"allMids"
dex
(string, optional) — Perp dex name. Defaults to empty string (first perp dex). Spot mids are only included with the first perp dex
Returns
Returns an object with coin symbols as keys and mid prices as string values.Mid price = (best bid + best ask) ÷ 2. When the order book is empty, the last trade price is used as fallback.
The response may also include internal index keys like
"@142"
alongside human‑readable symbols (for example, "BTC"
, "ETH"
). Use symbol keys for application logic and ignore "@..."
keys if not needed.Example request
Shell
Use cases
- Price discovery — Get current market prices for all available assets
- Portfolio valuation — Calculate total portfolio value using current prices
- Trading interfaces — Display real-time prices in dashboards
- Market monitoring — Track price movements across all markets
Body
application/json
Response
200 - application/json
Mid prices for all available coins
Object containing mid prices for all coins with coin symbols as keys and prices as values
Mid price for the coin as a string