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

# private/get_subaccount_value_history



## OpenAPI

````yaml /openapi.json post /private/get_subaccount_value_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: Onchain Actions
    description: >-
      L1 onchain actions submitted via OnchainActionManager: register deposit
      addresses, list pending deposits, and inspect onchain action history.
  - 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_subaccount_value_history:
    post:
      tags:
        - Other
      summary: private/get_subaccount_value_history
      operationId: private_get_subaccount_value_history
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetSubaccountValueHistoryRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubaccountValueHistoryResult'
        default:
          description: JSON-RPC error (see Error Codes)
components:
  schemas:
    GetSubaccountValueHistoryRequest:
      description: >-
        `wallet`, when set, takes precedence over `subaccount_id`. The window is
        unix milliseconds; `period` is seconds and must be one the sampler's
        tables cover.
      type: object
      properties:
        end_timestamp:
          default: null
          type:
            - integer
            - 'null'
          format: uint64
          minimum: 0
        page:
          default: null
          type:
            - integer
            - 'null'
          format: uint32
          minimum: 0
        page_size:
          default: null
          type:
            - integer
            - 'null'
          format: uint32
          minimum: 0
        period:
          default: null
          type:
            - integer
            - 'null'
          format: uint64
          minimum: 0
        start_timestamp:
          default: null
          type:
            - integer
            - 'null'
          format: uint64
          minimum: 0
        subaccount_id:
          default: null
          type:
            - integer
            - 'null'
          format: uint64
          minimum: 0
        wallet:
          default: null
          type:
            - string
            - 'null'
    SubaccountValueHistoryResult:
      description: >-
        By-wallet lookups return every owned subaccount's samples, concatenated
        and tagged with `subaccount_id` — not a summed wallet total. Coverage is
        ragged by design: a subaccount contributes no entry for buckets in which
        it held nothing, rather than reporting a zero it never had. Callers
        plotting a wallet total must group by `subaccount_id` and carry each
        series forward.
      type: object
      required:
        - pagination
        - subaccount_value_history
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        subaccount_value_history:
          type: array
          items:
            $ref: '#/components/schemas/SubaccountValueEntry'
    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
    SubaccountValueEntry:
      type: object
      required:
        - currency
        - initial_margin
        - maintenance_margin
        - margin_type
        - subaccount_id
        - subaccount_value
        - timestamp
      properties:
        currency:
          description: The manager's currencies, comma-joined; empty if it has none listed.
          type: string
        initial_margin:
          description: Initial margin at the sample, positive meaning healthy.
          type: string
          format: decimal
        maintenance_margin:
          description: Maintenance margin at the sample, positive meaning healthy.
          type: string
          format: decimal
        margin_type:
          description: Manager's margin model — "SM" or "PM2".
          type: string
        subaccount_id:
          type: integer
          format: uint64
          minimum: 0
        subaccount_value:
          description: >-
            Mark-to-market value, e12 fixed point on the wire as a decimal
            string.
          type: string
          format: decimal
        timestamp:
          description: The instant this sample is as-of, unix milliseconds.
          type: integer
          format: int64

````

## Related topics

- [private/get_interest_history](/api-reference/history/privateget_interest_history.md)
- [private/get_option_settlement_history](/api-reference/history/privateget_option_settlement_history.md)
- [private/get_trade_history](/api-reference/history/privateget_trade_history.md)
