{
  "id": "surf.hyperliquid.orders",
  "object": "tool",
  "name": "Open & Recent Orders",
  "summary": "Returns a wallet's live resting orders (open — stops, take-profits, limits, with trigger type) plus its recent terminal orders (historical — filled / canceled / rejected).",
  "description": "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).\n\nRaw surf#hyperliquid/orders endpoint: input is { body, queryParams, pathParams } as the provider documents them (https://docs.asksurf.ai/data-api/hyperliquid/orders).",
  "category": "lookup",
  "hosted_by": "Surf",
  "runtime": "partner",
  "side_effects": false,
  "status": "live",
  "credits": 0,
  "price": null,
  "providers": [
    {
      "id": "surf",
      "name": "Surf",
      "price": null,
      "own_key_only": true
    }
  ],
  "mcp_name": "surf_hyperliquid_orders",
  "input_schema": {
    "type": "object",
    "properties": {
      "queryParams": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "minLength": 1,
            "description": "Wallet address: a 0x EVM address or an ENS name (e.g. vitalik.eth). Solana addresses are not supported."
          },
          "open_limit": {
            "default": 500,
            "type": "integer",
            "minimum": 1,
            "maximum": 2000,
            "description": "Max open orders returned (market makers can hold 1500+; open_total reports the pre-truncation count). Defaults to 500."
          },
          "historical_limit": {
            "default": 200,
            "type": "integer",
            "minimum": 1,
            "maximum": 2000,
            "description": "Max terminal orders returned, newest first (the upstream feed holds ~1000 post-collapse; historical_total reports the pre-truncation count). Defaults to 200."
          }
        },
        "required": [
          "address"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "queryParams"
    ],
    "additionalProperties": false
  },
  "kind": "endpoint"
}