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

# Get Portfolio History

> Get the historical state of all or filtered accounts portfolio with pagination and interval sampling.

The interval parameter allows you to control data granularity:
- 5m: Raw data (default, collected every 5 minutes)
- 15m: One data point every 15 minutes
- 30m: One data point every 30 minutes
- 1h: One data point every hour
- 4h: One data point every 4 hours
- 12h: One data point every 12 hours
- 1d: One data point every day

Using larger intervals significantly reduces response size and improves performance.

Args:
    filter_request: JSON payload with filtering criteria (account_names, connector_names,
                   start_time, end_time, limit, cursor, interval)

Returns:
    Paginated response with historical portfolio data sampled at the requested interval



## OpenAPI

````yaml /api-reference/openapi.json post /portfolio/history
openapi: 3.1.0
info:
  title: Hummingbot API
  description: API for managing Hummingbot trading instances
  version: 1.0.1
servers:
  - url: http://localhost:8000
    description: Local development server
security: []
paths:
  /portfolio/history:
    post:
      tags:
        - Portfolio
      summary: Get Portfolio History
      description: >-
        Get the historical state of all or filtered accounts portfolio with
        pagination and interval sampling.


        The interval parameter allows you to control data granularity:

        - 5m: Raw data (default, collected every 5 minutes)

        - 15m: One data point every 15 minutes

        - 30m: One data point every 30 minutes

        - 1h: One data point every hour

        - 4h: One data point every 4 hours

        - 12h: One data point every 12 hours

        - 1d: One data point every day


        Using larger intervals significantly reduces response size and improves
        performance.


        Args:
            filter_request: JSON payload with filtering criteria (account_names, connector_names,
                           start_time, end_time, limit, cursor, interval)

        Returns:
            Paginated response with historical portfolio data sampled at the requested interval
      operationId: get_portfolio_history_portfolio_history_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PortfolioHistoryFilterRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBasic: []
components:
  schemas:
    PortfolioHistoryFilterRequest:
      properties:
        limit:
          type: integer
          maximum: 1000
          minimum: 1
          title: Limit
          description: Number of items per page
          default: 100
        start_time:
          anyOf:
            - type: integer
            - type: 'null'
          title: Start Time
          description: Start time as Unix timestamp in milliseconds
        end_time:
          anyOf:
            - type: integer
            - type: 'null'
          title: End Time
          description: End time as Unix timestamp in milliseconds
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Cursor
          description: Cursor for next page
        account_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Account Names
          description: List of account names to filter by
        connector_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Connector Names
          description: List of connector names to filter by
        interval:
          anyOf:
            - type: string
            - type: 'null'
          title: Interval
          description: >-
            Data sampling interval: 5m, 15m, 30m, 1h, 4h, 12h, 1d. Default is 5m
            (raw data)
          default: 5m
      type: object
      title: PortfolioHistoryFilterRequest
      description: Request model for filtering portfolio history
    PaginatedResponse:
      properties:
        data:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Data
        pagination:
          additionalProperties: true
          type: object
          title: Pagination
      type: object
      required:
        - data
        - pagination
      title: PaginatedResponse
      description: Generic paginated response.
      example:
        data: []
        pagination:
          has_more: true
          limit: 100
          next_cursor: '2024-01-10T12:00:00'
          total_count: 500
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBasic:
      type: http
      scheme: basic

````