> ## 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 perpetual funding history for a subaccount

> Returns a paginated history of perpetual funding (settlement) events for a single subaccount or an entire wallet (specify exactly one), optionally bounded by a start/end timestamp window and filtered by perpetual instrument name. The response includes the funding events with their instrument name and settled amounts, plus pagination info with total count and page count.



## OpenAPI

````yaml /openapi.json post /private/get_funding_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:
  /private/get_funding_history:
    post:
      tags:
        - History
      summary: Get perpetual funding history for a subaccount
      description: >-
        Returns a paginated history of perpetual funding (settlement) events for
        a single subaccount or an entire wallet (specify exactly one),
        optionally bounded by a start/end timestamp window and filtered by
        perpetual instrument name. The response includes the funding events with
        their instrument name and settled amounts, plus pagination info with
        total count and page count.
      operationId: private_get_funding_history
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetFundingHistoryRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PerpSettlementHistoryResponse'
        default:
          description: JSON-RPC error (see Error Codes)
components:
  schemas:
    GetFundingHistoryRequest:
      description: >-
        Parameters for `private/get_funding_history`.


        `subaccount_id`, `start_timestamp`, and `end_timestamp` accept either a
        JSON number or a string-encoded integer. Pagination is `page` >= 1,
        `page_size` in 1..=1000.
      type: object
      properties:
        end_timestamp:
          default: null
          type:
            - integer
            - 'null'
          format: int64
        instrument_name:
          default: null
          type:
            - string
            - 'null'
        page:
          default: null
          type:
            - integer
            - 'null'
          format: uint32
          minimum: 0
        page_size:
          default: null
          type:
            - integer
            - 'null'
          format: uint32
          minimum: 0
        start_timestamp:
          default: null
          type:
            - integer
            - 'null'
          format: int64
        subaccount_id:
          default: null
          type:
            - integer
            - 'null'
          format: uint64
          minimum: 0
        wallet:
          default: null
          type:
            - string
            - 'null'
    PerpSettlementHistoryResponse:
      type: object
      required:
        - events
        - pagination
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/PerpSettlementEventResponse'
        pagination:
          $ref: '#/components/schemas/Pagination'
    PerpSettlementEventResponse:
      type: object
      required:
        - batch_status
        - batch_uuid
        - funding
        - instrument_name
        - pnl
        - subaccount_id
        - timestamp
      properties:
        batch_status:
          $ref: '#/components/schemas/BatchStatus'
        batch_uuid:
          description: >-
            UUID of the settlement batch; a settlement in a reverted or errored
            batch reflects that status.
          type: string
        funding:
          type: string
        instrument_name:
          type: string
        pnl:
          type: string
        subaccount_id:
          type: integer
          format: uint64
          minimum: 0
        timestamp:
          type: integer
          format: int64
        tx_hash:
          type:
            - string
            - 'null'
    Pagination:
      description: Response envelope for paginated RPCs.
      type: object
      required:
        - count
        - num_pages
      properties:
        count:
          type: integer
          format: uint64
          minimum: 0
        num_pages:
          type: integer
          format: uint64
          minimum: 0
    BatchStatus:
      description: >-
        Batch lifecycle status — the single source of lifecycle truth for every
        operation in the batch (individual ops carry no status of their own).
        Each stage has a healthy variant and a corresponding `...Error` variant
        meaning that stage failed. Serialized as the variant name (string) in
        API responses.
      type: string
      enum:
        - Batching
        - Executing
        - Proving
        - Settling
        - Settled
        - BatchingError
        - ExecutingError
        - ProvingError
        - SettlingError
        - SettledError

````

## Related topics

- [Get interest history for a subaccount](/api-reference/history/get-interest-history-for-a-subaccount.md)
- [Get deposit history for a subaccount](/api-reference/history/get-deposit-history-for-a-subaccount.md)
- [Get withdrawal history for a subaccount](/api-reference/history/get-withdrawal-history-for-a-subaccount.md)
