> ## 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 lending interest-rate candles

> Returns lending borrow/supply APY OHLC candles for a `currency`'s pool over an optional time window (UTC milliseconds) at a `period` of 1h or larger (defaults to 1h; sub-hour periods are rejected). An optional `risk_universe_id` restricts to one pool; otherwise every universe's candles are returned, each tagged and carrying pool total supply/borrow. Public endpoint.



## OpenAPI

````yaml /openapi.json post /public/get_interest_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_interest_rate_history:
    post:
      tags:
        - Market Data
      summary: Get lending interest-rate candles
      description: >-
        Returns lending borrow/supply APY OHLC candles for a `currency`'s pool
        over an optional time window (UTC milliseconds) at a `period` of 1h or
        larger (defaults to 1h; sub-hour periods are rejected). An optional
        `risk_universe_id` restricts to one pool; otherwise every universe's
        candles are returned, each tagged and carrying pool total supply/borrow.
        Public endpoint.
      operationId: public_get_interest_rate_history
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetInterestRateHistoryRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InterestRateHistoryResult'
        default:
          description: JSON-RPC error (see Error Codes)
components:
  schemas:
    GetInterestRateHistoryRequest:
      description: >-
        Parameters for `public/get_interest_rate_history`. Timestamp fields
        accept either a JSON number or a string-encoded integer, and are UTC
        milliseconds.
      type: object
      required:
        - currency
      properties:
        currency:
          type: string
        end_timestamp:
          default: null
          type:
            - integer
            - 'null'
          format: int64
        period:
          default: null
          type:
            - integer
            - 'null'
          format: int64
        risk_universe_id:
          description: >-
            Restrict to one risk universe's pool. Omit to return every
            universe's candles for the currency (each candle is tagged with its
            universe).
          default: null
          type:
            - integer
            - 'null'
          format: uint32
          minimum: 0
        start_timestamp:
          default: null
          type:
            - integer
            - 'null'
          format: int64
    InterestRateHistoryResult:
      description: Response shape for `public/get_interest_rate_history`.
      type: object
      required:
        - interest_rate_history
      properties:
        interest_rate_history:
          type: array
          items:
            $ref: '#/components/schemas/InterestRateCandle'
    InterestRateCandle:
      description: >-
        One interest-rate candle: OHLC of the annualized borrow and supply APY
        plus the pool totals at the bucket close. `timestamp` is the bucket
        start in UTC milliseconds.
      type: object
      required:
        - borrow_apy
        - risk_universe_id
        - supply_apy
        - timestamp
        - total_borrow
        - total_supply
      properties:
        borrow_apy:
          $ref: '#/components/schemas/Ohlc'
        risk_universe_id:
          type: integer
          format: uint32
          minimum: 0
        supply_apy:
          $ref: '#/components/schemas/Ohlc'
        timestamp:
          type: integer
          format: int64
        total_borrow:
          type: string
        total_supply:
          type: string
    Ohlc:
      description: Open, high, low, and close for one series, each a decimal string.
      type: object
      required:
        - close
        - high
        - low
        - open
      properties:
        close:
          type: string
        high:
          type: string
        low:
          type: string
        open:
          type: string

````

## Related topics

- [Get perp funding-rate candles](/api-reference/market-data/get-perp-funding-rate-candles.md)
- [Get details for a single currency](/api-reference/market-data/get-details-for-a-single-currency.md)
- [Managers & Risk Universes](/trading/managers-and-risk-universes.md)
