{
  "id": "surf.exchange.funding-history",
  "object": "tool",
  "name": "Exchange Funding Rate History",
  "summary": "Returns historical funding rate records for a perpetual contract.",
  "description": "Returns historical funding rate records for a perpetual contract. Pagination: use from to set the start time and limit to control result count. For longer history, pass the last returned timestamp as the next from value. Note: not all exchanges support historical queries via from; some only return recent data regardless. For the latest funding rate snapshot, see /exchange/perp?fields=funding.\n\nRaw surf#exchange/funding-history endpoint: input is { body, queryParams, pathParams } as the provider documents them (https://docs.asksurf.ai/data-api/exchange/funding-history).",
  "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_exchange_funding-history",
  "input_schema": {
    "type": "object",
    "properties": {
      "queryParams": {
        "type": "object",
        "properties": {
          "pair": {
            "type": "string",
            "minLength": 1,
            "description": "Trading pair (e.g. BTC/USDT). Example: BTC/USDT."
          },
          "from": {
            "type": "string",
            "minLength": 1,
            "description": "Start of time range. Accepts Unix seconds or date string (YYYY-MM-DD, ISO8601). Not all exchanges support historical queries; some only return recent data regardless of this value. Example: 2026-03-01."
          },
          "limit": {
            "default": 100,
            "type": "integer",
            "minimum": 1,
            "maximum": 500,
            "description": "Max number of records. For longer history, paginate using the last returned timestamp as the next from value. Example: 100. Defaults to 100."
          },
          "exchange": {
            "default": "binance",
            "type": "string",
            "enum": [
              "binance",
              "okx",
              "bybit",
              "bitget",
              "gate",
              "htx",
              "mexc",
              "bitfinex",
              "bitmex",
              "hyperliquid"
            ],
            "description": "Exchange identifier. Note: hyperliquid uses USDC-settled perps (e.g. BTC/USDC:USDC); pass USDC-quoted pairs when querying hyperliquid. Example: binance. Defaults to \"binance\"."
          }
        },
        "required": [
          "pair"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "queryParams"
    ],
    "additionalProperties": false
  },
  "kind": "endpoint"
}