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

# Historical User Performance

> Get historical performance metrics for a user's vault position



## OpenAPI

````yaml open-apis/0d.json get /users/{address}/vaults/{vault_id}/historical
openapi: 3.1.0
info:
  title: zerod_api
  description: 0D Master API for vaults
  license:
    name: MIT
    identifier: MIT
  version: 0.1.0
servers:
  - url: https://api.0d.finance/{version}
    variables:
      version:
        default: v1
        enum:
          - v1
security: []
tags:
  - name: zerod_bin
    description: 0d, master api
  - name: User
    description: User profile endpoints
  - name: Vaults
    description: Vault management endpoints
paths:
  /users/{address}/vaults/{vault_id}/historical:
    get:
      tags:
        - User
      operationId: get_historical_user_performance
      parameters:
        - name: address
          in: path
          description: User wallet address
          required: true
          schema:
            type: string
        - name: vault_id
          in: path
          description: Vault identifier
          required: true
          schema:
            type: string
        - name: metric
          in: query
          description: User performance metric to return
          required: true
          schema:
            $ref: '#/components/schemas/PerformanceMetric'
        - name: timeframe
          in: query
          description: Time period for data
          required: false
          schema:
            $ref: '#/components/schemas/Timeframe'
        - name: currency
          in: query
          description: Display currency
          required: false
          schema:
            $ref: '#/components/schemas/Currency'
      responses:
        '200':
          description: Historical User performance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HistoricalUserPerformance'
        '400':
          description: Invalid parameters
        '404':
          description: User or vault not found
        '500':
          description: Internal server error
        '503':
          description: Indexer not synced or experiencing issues
components:
  schemas:
    PerformanceMetric:
      type: string
      enum:
        - all_time_pnl
        - unrealized_pnl
        - realized_pnl
    Timeframe:
      type: string
      enum:
        - 7d
        - 30d
        - 1y
        - all
    Currency:
      type: string
      enum:
        - usd
        - usdc
    HistoricalUserPerformance:
      type: object
      required:
        - metric
        - timeframe
        - points
      properties:
        metric:
          $ref: '#/components/schemas/PerformanceMetric'
        points:
          type: array
          items:
            $ref: '#/components/schemas/HistoricalDataPoint'
        timeframe:
          $ref: '#/components/schemas/Timeframe'
    HistoricalDataPoint:
      type: object
      required:
        - t
        - v
      properties:
        t:
          type: string
          format: date-time
        v:
          type: string

````