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

# Get perp funding-rate candles

> Returns funding-rate OHLC candles for a perpetual instrument (`instrument_name`) over an optional `start_timestamp`/`end_timestamp` window (UTC milliseconds) at a `period` granularity (defaults to 1h; 60s up to 1w supported). Each candle carries open/high/low/close per-hour rates plus a `funding_rate` mirroring the close. Public endpoint.



## OpenAPI

````yaml /openapi.json post /public/get_funding_rate_history
openapi: 3.1.0
info:
  title: Derive v3 API
  version: 0.2.0
  description: JSON-RPC 2.0 methods, served over WebSocket and HTTP POST.
servers:
  - url: https://api.derive.xyz/v3
    description: Production (HTTP POST base)
  - url: https://testnet.api.derive.xyz/v3
    description: Testnet (HTTP POST base)
security: []
tags:
  - name: Subaccounts
    description: >-
      List, inspect, and label subaccounts, portfolios, positions, and
      collateral.
  - name: Session Keys
    description: Register, edit, and list delegated signing keys.
  - name: Account
    description: Wallet-level account information and settings.
  - name: Orderbook
    description: Place, replace, cancel, and query orders, trigger orders, and algos.
  - name: RFQ
    description: 'Request-for-quote: send RFQs, quote, and execute block trades.'
  - name: Vault Shareholders
    description: >-
      Deposit into and withdraw from vaults, and track shares, requests, and
      performance.
  - name: Vault Curators
    description: >-
      Create and operate curated vaults: settle deposit and withdrawal requests,
      and manage vault metadata.
  - name: History
    description: >-
      Per-account historical records: orders, trades, transfers, and
      settlements.
  - name: Market Maker Protection
    description: Configure, read, and reset market-maker protection.
  - name: Transfers & Withdrawals
    description: Move collateral between subaccounts, to other wallets, and on-chain.
  - name: System
    description: Rate limits and transaction lookups.
  - name: Market Data
    description: Instruments, currencies, tickers, and market-wide feeds.
  - name: Referrals
    description: Referral codes and program performance.
  - name: Other
    description: Uncategorized.
paths:
  /public/get_funding_rate_history:
    post:
      tags:
        - Market Data
      summary: Get perp funding-rate candles
      description: >-
        Returns funding-rate OHLC candles for a perpetual instrument
        (`instrument_name`) over an optional `start_timestamp`/`end_timestamp`
        window (UTC milliseconds) at a `period` granularity (defaults to 1h; 60s
        up to 1w supported). Each candle carries open/high/low/close per-hour
        rates plus a `funding_rate` mirroring the close. Public endpoint.
      operationId: public_get_funding_rate_history
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetFundingRateHistoryRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FundingRateHistoryResult'
        default:
          description: JSON-RPC error (see Error Codes)
components:
  schemas:
    GetFundingRateHistoryRequest:
      description: >-
        Parameters for `public/get_funding_rate_history`. Timestamp fields
        accept either a JSON number or a string-encoded integer, and are UTC
        milliseconds.
      type: object
      required:
        - instrument_name
      properties:
        end_timestamp:
          default: null
          type:
            - integer
            - 'null'
          format: int64
        instrument_name:
          type: string
        period:
          default: null
          type:
            - integer
            - 'null'
          format: int64
        start_timestamp:
          default: null
          type:
            - integer
            - 'null'
          format: int64
    FundingRateHistoryResult:
      description: Response shape for `public/get_funding_rate_history`.
      type: object
      required:
        - funding_rate_history
      properties:
        funding_rate_history:
          type: array
          items:
            $ref: '#/components/schemas/FundingRateCandle'
    FundingRateCandle:
      description: >-
        Single funding-rate OHLC candle. `funding_rate` mirrors `close` for
        backward compatibility with the pre-OHLC response shape; `timestamp` is
        the bucket start in UTC milliseconds.
      type: object
      required:
        - close
        - currency
        - funding_rate
        - high
        - low
        - open
        - risk_universe_id
        - timestamp
      properties:
        close:
          type: string
        currency:
          type: string
        funding_rate:
          type: string
        high:
          type: string
        low:
          type: string
        open:
          type: string
        risk_universe_id:
          type: integer
          format: uint32
          minimum: 0
        timestamp:
          type: integer
          format: int64

````

## Related topics

- [Get lending interest-rate candles](/api-reference/market-data/get-lending-interest-rate-candles.md)
- [Get perpetual funding history for a subaccount](/api-reference/history/get-perpetual-funding-history-for-a-subaccount.md)
- [Get a single tradeable instrument](/api-reference/market-data/get-a-single-tradeable-instrument.md)
