> ## Documentation Index
> Fetch the complete documentation index at: https://docs.asksurf.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Funding Rate History



## OpenAPI

````yaml openapi.json GET /gateway/v1/exchange/funding-history
openapi: 3.1.0
info:
  title: Hermod
  version: 0.0.1
servers:
  - url: https://api.asksurf.ai
security: []
paths:
  /gateway/v1/exchange/funding-history:
    get:
      tags:
        - Exchange
      summary: Exchange Funding Rate History
      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`.
      operationId: exchange-funding-history
      parameters:
        - description: Trading pair (e.g. BTC/USDT)
          explode: false
          in: query
          name: pair
          required: true
          schema:
            description: Trading pair (e.g. BTC/USDT)
            examples:
              - BTC/USDT
            type: string
        - 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.
          explode: false
          in: query
          name: from
          schema:
            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.
            examples:
              - '2026-03-01'
            type: string
        - description: >-
            Max number of records. For longer history, paginate using the last
            returned timestamp as the next from value.
          explode: false
          in: query
          name: limit
          schema:
            default: 100
            description: >-
              Max number of records. For longer history, paginate using the last
              returned timestamp as the next from value.
            examples:
              - 100
            format: int64
            maximum: 500
            minimum: 1
            type: integer
        - description: Exchange identifier
          explode: false
          in: query
          name: exchange
          schema:
            default: binance
            description: Exchange identifier
            enum:
              - binance
              - okx
              - bybit
              - bitget
              - gate
              - htx
              - mexc
              - bitfinex
              - bitmex
            examples:
              - binance
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/SimpleListResponseExchangeFundingHistoryItem
          description: OK
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataAPIError'
          description: Error
      security:
        - AccessToken: []
components:
  schemas:
    SimpleListResponseExchangeFundingHistoryItem:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - >-
              https://example.com/schemas/SimpleListResponseExchangeFundingHistoryItem.json
          format: uri
          readOnly: true
          type: string
        data:
          items:
            $ref: '#/components/schemas/ExchangeFundingHistoryItem'
          type:
            - array
            - 'null'
        meta:
          $ref: '#/components/schemas/ObjectResponseMeta'
      required:
        - data
        - meta
      type: object
    DataAPIError:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/DataAPIError.json
          format: uri
          readOnly: true
          type: string
        error:
          $ref: '#/components/schemas/DataAPIErrorDetail'
      required:
        - error
      type: object
    ExchangeFundingHistoryItem:
      additionalProperties: false
      properties:
        exchange:
          description: Exchange identifier
          type: string
        funding_rate:
          description: Funding rate at this settlement
          format: double
          type:
            - number
            - 'null'
        pair:
          description: Perpetual contract pair like BTC/USDT
          type: string
        timestamp:
          description: Unix timestamp in seconds
          format: int64
          type:
            - integer
            - 'null'
      required:
        - exchange
        - pair
        - funding_rate
        - timestamp
      type: object
    ObjectResponseMeta:
      additionalProperties: false
      properties:
        cached:
          description: Whether this response was served from cache
          type: boolean
        credits_used:
          description: Credits deducted for this request
          format: int64
          type: integer
      required:
        - credits_used
        - cached
      type: object
    DataAPIErrorDetail:
      additionalProperties: false
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object

````