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

# Get user funding rate history

> Retrieve perp funding rate payment history for a specific user.
Shows funding payments including the direction, amount, and associated fees.
Supports filtering by perp market, side, and timestamp range. Supports sorting and pagination. Page size is capped at 200.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/funding_rate_history
openapi: 3.1.0
info:
  title: Decibel Trading API
  description: >-
    RESTful API for Decibel. Provides read-only endpoints for market data,
    trading operations, positions, and analytics.
  contact:
    name: Decibel Team
    url: https://decibel.trade/
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.mainnet.aptoslabs.com/decibel
    description: Mainnet
  - url: https://api.testnet.aptoslabs.com/decibel
    description: Testnet
security:
  - bearerAuth: []
tags:
  - name: Market Data
    description: Market information and real-time data endpoints
  - name: User
    description: User information and account management
  - name: Account
    description: Account-specific endpoints and data
  - name: Trades
    description: Trading operations and history
  - name: Positions
    description: User position management
  - name: Orders
    description: Order management and history
  - name: TWAP
    description: Time-weighted average price orders
  - name: Bulk Orders
    description: Bulk order management
  - name: Vaults
    description: Vault operations and management
  - name: Analytics
    description: Analytics and performance metrics
  - name: Points
    description: Points-related account metrics
  - name: Trading Points
    description: Trading points endpoints
  - name: Trading Hz
    description: Trading Hz endpoints
  - name: Tier
    description: Tier information endpoints
  - name: Streaks
    description: User streak tracking endpoints
  - name: Predeposit Rewards
    description: Season 0 predeposit USDC rewards
  - name: Referrals
    description: Referral code management and tracking
  - name: Affiliates
    description: Affiliate code and earnings endpoints
  - name: Campaigns
    description: On-chain reward campaign endpoints
paths:
  /api/v1/funding_rate_history:
    get:
      tags:
        - Account
      summary: Get user funding rate history
      description: >-
        Retrieve perp funding rate payment history for a specific user.

        Shows funding payments including the direction, amount, and associated
        fees.

        Supports filtering by perp market, side, and timestamp range. Supports
        sorting and pagination. Page size is capped at 200.
      operationId: handle_funding_rate_history
      parameters:
        - name: account
          in: query
          description: User account address (`user` query alias is also accepted)
          required: true
          schema:
            type: string
        - name: market
          in: query
          description: Filter by market address
          required: false
          schema:
            type: string
        - name: side
          in: query
          description: Filter by side
          required: false
          schema:
            $ref: '#/components/schemas/SideFilter'
        - name: limit
          in: query
          description: Page size
          required: false
          schema:
            type: integer
            format: int32
            default: 10
            maximum: 200
            minimum: 0
          example: 100
        - name: offset
          in: query
          description: Page offset
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            maximum: 10000
            minimum: 0
          example: 0
        - name: start_timestamp
          in: query
          required: false
          schema:
            type: integer
            format: int64
        - name: end_timestamp
          in: query
          required: false
          schema:
            type: integer
            format: int64
        - name: sort_key
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/HistorySortKey'
        - name: sort_dir
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/SortDir'
      responses:
        '200':
          description: Funding rate history retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_FundingRateHistory'
        '500':
          description: Database error
components:
  schemas:
    SideFilter:
      type: string
      description: >-
        Order side filter: buy (long) or sell (short).

        For orders, maps to `is_buy` column. For trades/funding, maps to

        `action IN ('OpenLong','CloseShort')` (buy) or `action IN
        ('CloseLong','OpenShort')` (sell).
      enum:
        - buy
        - sell
    HistorySortKey:
      type: string
      description: Sort key for history endpoints
      enum:
        - timestamp
    SortDir:
      type: string
      enum:
        - ASC
        - DESC
    PaginatedResponse_FundingRateHistory:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            type: object
            required:
              - market
              - action
              - size
              - realized_funding_amount
              - is_rebate
              - fee_amount
              - transaction_unix_ms
            properties:
              action:
                type: string
                example: Close Long
              fee_amount:
                type: number
                format: double
              is_rebate:
                type: boolean
              market:
                type: string
                example: 0xmarket123...
              realized_funding_amount:
                type: number
                format: double
                description: >-
                  Realized funding amount in USDC

                  - Negative value: trader PAID funding (e.g., long position
                  with positive funding rate)

                  - Positive value: trader RECEIVED funding (e.g., short
                  position with positive funding rate)

                  - Zero: no funding accrued
                example: -15.5
              size:
                type: number
                format: double
                example: 1
              transaction_unix_ms:
                type: integer
                format: int64
                example: 1735758000000
          description: The items in the current page
        total_count:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            The total number of items across all pages.

            Optional: history endpoints omit this field to avoid expensive
            COUNT(*) queries.
          minimum: 0
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from Geomi. See
        [Authentication](/api-reference/rest/authentication) for setup
        instructions.

````