๐Ÿ”Œ API & Developers

Hyperliquid allMids Info Endpoint: Empty Order Book and Last Trade Price Fallback

โš ๏ธ Disclosure: Some links on this page are affiliate links. If you sign up through them, I may earn a commission โ€” at no extra cost to you.
The allMids request on Hyperliquid's info endpoint returns midpoint prices for coins. According to the Hyperliquid Info endpoint docs, if a coin's order book is empty, the last trade price is used as a fallback.

Request

Send a POST request to:

https://api.hyperliquid.xyz/info

Use the Content-Type: application/json header.

Documented request body for allMids:

FieldRequiredTypeDescription
typeYesStringMust be "allMids"
dexNoStringPerp dex name. Defaults to the empty string, which represents the first perp dex. Spot mids are included only with the first perp dex.
Reference example:

curl -X POST https://api.hyperliquid.xyz/info \
  -H "Content-Type: application/json" \
  -d '{"type":"allMids"}'

To request a specific perp dex:

curl -X POST https://api.hyperliquid.xyz/info \
  -H "Content-Type: application/json" \
  -d '{"type":"allMids","dex":"<perp-dex-name>"}'

Response format

๐Ÿ’ก Hyperliquid

Like what you're reading? Try it yourself โ€” this link supports ChartedTrader at no cost to you.

Create a Hyperliquid account โ†’
๐ŸŽ You receive: 4% fee discount on first $25M volume ยท per account, lifetime

The documented successful response is a JSON object mapping coin names to price strings:

{
    "APE": "4.33245",
    "ARB": "1.21695"
}

The response values are strings, not numeric types. Parse them as decimals in application code if needed.

Empty order book behavior

When the order book for a coin is empty, allMids does not return a midpoint calculated from bids and asks. Instead, the docs state that the last trade price is used as a fallback.

This matters when troubleshooting price displays or bot logic:

allMids is one of several request types on the same info endpoint. For user-specific market data such as open orders, fills, rate limits, and order status, see Hyperliquid Info Endpoint: User Open Orders, Fills, Rate Limits, and Order Status (2026).

Create a Hyperliquid account

Continue with Hyperliquid

Browse the Hyperliquid guide hub for the complete user journey.

๐Ÿงฎ Free Hyperliquid calculators

Fee Calculator โ†’
Hyperliquid vs centralized exchange fee comparison
PnL & Liquidation โ†’
Perp PnL + liquidation price
Position Size โ†’
Risk-aware position sizing for HL perps
Hyperliquid

Ready to get started? Use the link below โ€” it helps support ChartedTrader at no cost to you.

Create a Hyperliquid account โ†’
๐ŸŽ You receive: 4% fee discount on first $25M volume ยท per account, lifetime
๐Ÿ“ˆ

About the author

I'm a systematic trader running live strategies on IB (USDJPY momentum) and Hyperliquid (crypto perps). Questions? Reach out.

๐Ÿ“š Related Articles

๐Ÿ”Œ
API & Developers

Hyperliquid API Websocket Guide for Developers (2026)

Connect to Hyperliquid WebSocket endpoints, subscribe to basic feeds, send post requests, and keep the connection alive with ping/pong and reconnect handling.

July 29, 2026 โฑ 8 min read
๐Ÿ”Œ
API & Developers

Hyperliquid WebSocket Subscriptions: Message Formats, Types, and Examples

How to subscribe to Hyperliquid WebSocket feeds, with subscription message formats, supported types, snapshots, unsubscribe messages, and user-address pitfalls.

November 9, 2026 โฑ 5 min read
๐Ÿ”Œ
API & Developers

Hyperliquid Info Endpoint: User Open Orders, Fills, Rate Limits, and Order Status (2026)

Reference for Hyperliquid info endpoint types openOrders, frontendOpenOrders, userFills, userRateLimit, and orderStatus, with request shapes and response fields.

December 1, 2026 โฑ 7 min read