{
  "id": "surf.hyperliquid.positions",
  "object": "tool",
  "name": "Open Positions",
  "summary": "Returns a wallet's open perpetual positions with its cross-margin summary and derived risk (leverage, unrealized PnL, ROE, liquidation price, margin ratio, distance-to-liquidation).",
  "description": "Returns a wallet's open perpetual positions with its cross-margin summary and derived risk (leverage, unrealized PnL, ROE, liquidation price, margin ratio, distance-to-liquidation). liquidation_price (and distance_to_liquidation) can be null even on a leveraged position — Hyperliquid returns none for cross positions whose spot collateral backstops them; in that case use the account-level margin_ratio (the account liquidates as it approaches 1.0) for proximity. account_value here is perp clearinghouse equity, not total portfolio (see /hyperliquid/account). Positions are sorted by position value (largest first). dex scopes to a builder market; omit (or main_dex) for the native market.\n\nRaw surf#hyperliquid/positions endpoint: input is { body, queryParams, pathParams } as the provider documents them (https://docs.asksurf.ai/data-api/hyperliquid/positions).",
  "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_positions",
  "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."
          },
          "dex": {
            "type": "string",
            "enum": [
              "main_dex",
              "xyz",
              "flx",
              "vntl",
              "hyna",
              "km",
              "abcd",
              "cash",
              "para",
              "mkts"
            ],
            "description": "Market scope: omit (or main_dex) for the native market, or a builder market — one of: xyz, flx, vntl, hyna, km, abcd, cash, para, mkts."
          }
        },
        "required": [
          "address"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "queryParams"
    ],
    "additionalProperties": false
  },
  "kind": "endpoint"
}