---
title: "Open & Recent Orders"
method: GET
path: "/gateway/v1/hyperliquid/orders"
tags: ["Hyperliquid"]
---

# Open & Recent Orders

`GET /gateway/v1/hyperliquid/orders`

Returns a wallet's live resting orders (`open` — stops, take-profits, limits, with trigger type) plus its recent terminal orders (`historical` — filled / canceled / rejected). Use `open` for "is a stop set right now?" and `historical` for the set-then-cancelled timeline. Order `side` is in trade terms (`buy`/`sell`), not position terms — a sell stop protects a long; join to `/hyperliquid/positions` by `symbol`.

Sections are truncated to `open_limit` (default 500) / `historical_limit` (default 200) — `open_total`/`historical_total` carry the pre-truncation counts. Both sections mix PERP and SPOT orders — check `market_type`: spot orders carry raw spot-pair-index symbols (`@107`) that never join to `/positions`, `/trades`, or `/fills` (perp-only surfaces); filter `market_type=perp` for a perp working-orders panel.

`historical` is **one row per order at its final status**, newest first: the upstream feed is a status-transition stream (an order appears as `open`, then `filled`/`canceled`), so we collapse it to the latest status per order id and drop still-`open` orders (those are in the `open` section) — a passthrough would double-count ids and mislabel status. Status values pass through Hyperliquid's raw camelCase vocabulary: `filled`, `canceled`, plus reject variants like `iocCancelRejected`, `badAloPxRejected`, `selfTradeCanceled`, `insufficientSpotBalanceRejected` — treat any status other than `filled`/`canceled` as a rejection bucket. Derived from the most-recent ~2000 status updates.

The two sections fetch independently: a failed section is named in `errors[]` and the call still returns 200 (502 only if both fail).

## Query parameters

- `address` string, required — Wallet address: a 0x EVM address or an ENS name (e.g. vitalik.eth). Solana addresses are not supported.
- `open_limit` integer — Max open orders returned (market makers can hold 1500+; open_total reports the pre-truncation count).
- `historical_limit` integer — Max terminal orders returned, newest first (the upstream feed holds ~1000 post-collapse; historical_total reports the pre-truncation count).

## Response `200`

OK

- DataObjectResponseHyperliquidOrders
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `data` HyperliquidOrders, required
    - `address` string, required — Wallet address (lowercased)
    - `as_of` integer, required — When the order sections were fetched upstream (Unix seconds) — the data's age, which for a cached response predates the response time by up to the cache TTL
    - `errors` HyperliquidSectionError[], nullable — Sections whose fetch failed (open, historical); omitted when everything succeeded
      - `reason` string, required — Short reason for the failure
      - `section` string, required — Section that failed: perp, spot, vaults, staking, or pricing (the HYPE-mark lookup that values total_value_usd)
    - `historical` HyperliquidHistoricalOrder[], nullable, required — Recent terminal orders (filled / canceled / rejected, newest status first), truncated to historical_limit
      - `is_position_tpsl` boolean, required — true when this was a position-level TP/SL
      - `is_trigger` boolean, required — true for stop / take-profit (trigger) orders
      - `limit_price` number, double, required — Limit price, USD
      - `market_type` string, required — perp or spot. Spot orders carry @index symbols and belong to the spot book, not the perp surfaces.
      - `order_id` integer, required — Order id (oid)
      - `order_type` string, required — Order type (Limit, Stop Market, …)
      - `original_size` number, double, required — Original size when placed (token units)
      - `placed_time` integer, required — When the order was placed (Unix seconds)
      - `reduce_only` boolean, required — true when the order could only reduce the position
      - `side` string, required — buy or sell
      - `size` number, double, required — Remaining size at the terminal state (token units)
      - `status` string, required — Terminal status: filled, canceled, rejected, …
      - `status_time` integer, required — When the order reached this status (Unix seconds)
      - `symbol` string, required — Market id. Perp orders use the coin name (BTC, xyz:GOLD); SPOT orders use a raw spot-pair index (@107) — see market_type.
      - `trigger_condition` string, required — Human-readable trigger condition (empty for plain limit orders)
      - `trigger_price` number, double, required — Trigger price for stop/take-profit orders, USD (0 when not a trigger)
    - `historical_total` integer, required — Total terminal orders before historical_limit truncation — greater than len(historical) means the list was cut
    - `open` HyperliquidOpenOrder[], nullable, required — Live resting orders (stops / take-profits / limits), truncated to open_limit
      - `is_position_tpsl` boolean, required — true when this is a position-level TP/SL
      - `is_trigger` boolean, required — true for stop / take-profit (trigger) orders
      - `limit_price` number, double, required — Limit price, USD
      - `market_type` string, required — perp or spot. Spot orders carry @index symbols and belong to the spot book, not the perp surfaces.
      - `order_id` integer, required — Order id (oid)
      - `order_type` string, required — Order type (Limit, Stop Market, …)
      - `original_size` number, double, required — Original size when placed (token units)
      - `reduce_only` boolean, required — true when the order can only reduce the position
      - `side` string, required — buy or sell
      - `size` number, double, required — Remaining size (token units)
      - `symbol` string, required — Market id. Perp orders use the coin name (BTC, xyz:GOLD); SPOT orders use a raw spot-pair index (@107) that does not join to /positions, /trades, or /fills — see market_type.
      - `timestamp` integer, required — When the order was placed (Unix seconds)
      - `trigger_condition` string, required — Human-readable trigger condition (empty for plain limit orders)
      - `trigger_price` number, double, required — Trigger price for stop/take-profit orders, USD (0 when not a trigger)
    - `open_total` integer, required — Total open orders before open_limit truncation — greater than len(open) means the list was cut
  - `meta` ObjectResponseMeta, required
    - `cached` boolean, required — Whether this response was served from cache
    - `credits_used` integer, required — Credits deducted for this request
    - `empty_reason` string — Hint explaining why the data array is empty, when applicable

## Other responses

- `default` — Error

---

[API](https://skmtc.dev/asksurf/apis/asksurf-public-rest-api.md) · [All operations](https://skmtc.dev/asksurf/apis/asksurf-public-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/asksurf/asksurf-public-rest-api/revisions/498f461e81c4/schema)
