Skip to content

Quote a HyperCore spot swap

GET /hypercore/spot-quote

Quote a swap against Hyperliquid's Core order book and return the order to execute. Core spot is separate from the EVM /quote planner (no addresses or calldata — execution is an order). The response's execution.orderRequest is placed via Photon's /api/hypercore/order.

Authentication

Send your API key in the api-key header.

Parameters

Name In Type Required Description
chain query integer yes HyperCore chain id.
base query string yes Base token symbol, e.g. HYPE.
quote query string yes Quote token symbol, e.g. USDC.
amount query string yes Base amount as a decimal string.
isBuy query boolean no Buy base with quote (true) or sell base (false).
slippage query number no Slippage percent (1 = 1%); default 0.5.

Responses

Status Description
200 Spot quote + execution hint.
200 response
{
  "code": 0,
  "data": {
    "routeKind": "hypercoreSpot",
    "assetIndex": 10000,
    "pair": "HYPE/USDC",
    "isBuy": true,
    "bestPrice": 24.7,
    "limitPrice": 24.82,
    "amountIn": "2",
    "estimatedAmountOut": "49.4",
    "execution": {
      "endpoint": "POST {photon}/api/hypercore/order",
      "orderRequest": {},
      "note": "\u2026"
    }
  },
  "message": "success"
}