{
  "id": "surf.hyperliquid.trades.context",
  "object": "tool",
  "name": "Closed Trade Funding and Leverage",
  "summary": "Returns immutable funding and leverage context for one closed trade identified by the composite key from /hyperliquid/trades.",
  "description": "Returns immutable funding and leverage context for one closed trade identified by the composite key from /hyperliquid/trades. Use this for a selected trade detail instead of enriching every history row. funding_status=complete distinguishes a real zero from unavailable historical data; leverage fields are omitted when the completed-trade source has no value.\n\nRaw surf#hyperliquid/trades/context endpoint: input is { body, queryParams, pathParams } as the provider documents them (https://docs.asksurf.ai).",
  "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_trades_context",
  "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."
          },
          "symbol": {
            "type": "string",
            "minLength": 1,
            "description": "Hyperliquid perpetual market id, including a builder prefix for HIP-3 markets (for example xyz:GOLD)."
          },
          "direction": {
            "type": "string",
            "enum": [
              "long",
              "short"
            ],
            "description": "Opening direction of the episode."
          },
          "open_time": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "Episode open time, Unix seconds, copied from GET /hyperliquid/trades."
          },
          "close_time": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "Episode close time, Unix seconds, copied from GET /hyperliquid/trades."
          }
        },
        "required": [
          "address",
          "symbol",
          "direction",
          "open_time",
          "close_time"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "queryParams"
    ],
    "additionalProperties": false
  },
  "kind": "endpoint"
}