> ## 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 Performance History

> Historical performance for one subject, newest first, in one normalized row shape.

Both subjects page identically: descending timestamp, `cursor` is the last row's
timestamp, `has_more` says whether another page exists.

`interval` is a floor, not a guarantee. The controller series is written on a
5-minute grain, so asking it for `1m` returns that native grain; the executor series
is written on PERFORMANCE_EXECUTOR_SNAPSHOT_INTERVAL (60s by default). The echoed
`interval` says what was asked for, the timestamps say what was served.

It is a claim about resolution only. Sampling is per scope -- per executor, per (bot,
controller) -- so a coarser interval thins every scope's own series and never drops a
scope from the answer. An unnarrowed query over a fleet returns the whole fleet at
every interval, at a lower resolution.

Realized vs unrealized, for executors: an executor reports one net PnL, and the split
comes from whether its position is really settled. A `POSITION_HOLD` close is NOT
settled -- it hands the position on to position_holds, which report it in their own
right -- so its PnL stays in `unrealized_pnl_quote` even though `is_terminal` is true
and `status` is TERMINATED. Counting it realized here would double-count it, the same
exclusion /executors/performance applies. Any other terminal close is realized.

An executor's series is answered from executor_performance_snapshots alone, including
its final value: completion writes a terminal row, so there is no join to the
executors table and no "and then append the last point" rule. An executor that was
live when the API crashed gets its terminal row from the startup reap instead, carrying
`close_type: SYSTEM_CLEANUP` and the last figures observed before the crash -- an
approximated close, marked as one, rather than a series that never ends.



## OpenAPI

````yaml /api-reference/openapi.json get /performance/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:
  /performance/history:
    get:
      tags:
        - Performance
      summary: Get Performance History
      description: >-
        Historical performance for one subject, newest first, in one normalized
        row shape.


        Both subjects page identically: descending timestamp, `cursor` is the
        last row's

        timestamp, `has_more` says whether another page exists.


        `interval` is a floor, not a guarantee. The controller series is written
        on a

        5-minute grain, so asking it for `1m` returns that native grain; the
        executor series

        is written on PERFORMANCE_EXECUTOR_SNAPSHOT_INTERVAL (60s by default).
        The echoed

        `interval` says what was asked for, the timestamps say what was served.


        It is a claim about resolution only. Sampling is per scope -- per
        executor, per (bot,

        controller) -- so a coarser interval thins every scope's own series and
        never drops a

        scope from the answer. An unnarrowed query over a fleet returns the
        whole fleet at

        every interval, at a lower resolution.


        Realized vs unrealized, for executors: an executor reports one net PnL,
        and the split

        comes from whether its position is really settled. A `POSITION_HOLD`
        close is NOT

        settled -- it hands the position on to position_holds, which report it
        in their own

        right -- so its PnL stays in `unrealized_pnl_quote` even though
        `is_terminal` is true

        and `status` is TERMINATED. Counting it realized here would double-count
        it, the same

        exclusion /executors/performance applies. Any other terminal close is
        realized.


        An executor's series is answered from executor_performance_snapshots
        alone, including

        its final value: completion writes a terminal row, so there is no join
        to the

        executors table and no "and then append the last point" rule. An
        executor that was

        live when the API crashed gets its terminal row from the startup reap
        instead, carrying

        `close_type: SYSTEM_CLEANUP` and the last figures observed before the
        crash -- an

        approximated close, marked as one, rather than a series that never ends.
      operationId: get_performance_history_performance_history_get
      parameters:
        - name: subject
          in: query
          required: true
          schema:
            type: string
            pattern: ^(controller|executor)$
            description: 'Which population to read: "controller" or "executor"'
            title: Subject
          description: 'Which population to read: "controller" or "executor"'
        - name: bot_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by bot name (controller subject only)
            title: Bot Name
          description: Filter by bot name (controller subject only)
        - name: controller_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by controller ID (either subject)
            title: Controller Id
          description: Filter by controller ID (either subject)
        - name: executor_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by executor ID (executor subject only)
            title: Executor Id
          description: Filter by executor ID (executor subject only)
        - name: executor_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by executor type (executor subject only)
            title: Executor Type
          description: Filter by executor type (executor subject only)
        - name: account_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by account name (executor subject only)
            title: Account Name
          description: Filter by account name (executor subject only)
        - name: connector_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by connector (executor subject only)
            title: Connector Name
          description: Filter by connector (executor subject only)
        - name: trading_pair
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by trading pair (executor subject only)
            title: Trading Pair
          description: Filter by trading pair (executor subject only)
        - name: start_time
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: ISO 8601 start of the window
            title: Start Time
          description: ISO 8601 start of the window
        - name: end_time
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: ISO 8601 end of the window
            title: End Time
          description: ISO 8601 end of the window
        - name: interval
          in: query
          required: false
          schema:
            type: string
            pattern: ^(1m|5m|15m|30m|1h|4h|12h|1d)$
            default: 5m
            title: Interval
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            default: 100
            title: Limit
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Cursor from a previous page's next_cursor
            title: Cursor
          description: Cursor from a previous page's next_cursor
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PerformanceHistoryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBasic: []
components:
  schemas:
    PerformanceHistoryResponse:
      properties:
        status:
          type: string
          title: Status
          default: success
        data:
          items:
            $ref: '#/components/schemas/PerformanceRow'
          type: array
          title: Data
        pagination:
          additionalProperties: true
          type: object
          title: Pagination
          description: next_cursor, has_more, limit and the interval that was requested
      type: object
      required:
        - data
        - pagination
      title: PerformanceHistoryResponse
      description: >-
        Envelope of GET /performance/history, matching the controller route's
        shape.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PerformanceRow:
      properties:
        timestamp:
          type: string
          title: Timestamp
          description: ISO 8601 timestamp of the snapshot
        subject:
          type: string
          title: Subject
          description: 'Which population this row came from: "controller" or "executor"'
        scope_id:
          type: string
          title: Scope Id
          description: controller_id for controllers, executor_id for executors
        status:
          type: string
          title: Status
          description: Status at the moment of the snapshot
        is_terminal:
          type: boolean
          title: Is Terminal
          description: >-
            True only on the final row of a completed executor's series. Always
            false for controllers, which have no terminal row.
          default: false
        realized_pnl_quote:
          type: number
          title: Realized Pnl Quote
          description: >-
            Realized PnL in quote currency. For an executor this is its net PnL
            once the position is really settled, and 0 while it is not. A
            POSITION_HOLD close is not settled: the position carries on in
            position_holds, so a held executor's PnL stays unrealized here even
            though is_terminal is true.
        unrealized_pnl_quote:
          type: number
          title: Unrealized Pnl Quote
          description: >-
            Unrealized PnL in quote currency. For an executor this is its net
            PnL while the position is open, and after a POSITION_HOLD close.
        global_pnl_quote:
          type: number
          title: Global Pnl Quote
          description: Total PnL (realized + unrealized) in quote currency
        global_pnl_pct:
          type: number
          title: Global Pnl Pct
          description: Total PnL as a fraction of the capital deployed
        volume_quote:
          type: number
          title: Volume Quote
          description: >-
            Volume traded in quote currency. Volume GENERATED, not capital
            deployed: an LP position's deposit is excluded.
        cum_fees_quote:
          anyOf:
            - type: number
            - type: 'null'
          title: Cum Fees Quote
          description: >-
            Cumulative fees in quote currency. NULL for controllers: their
            PerformanceReport genuinely has no fees field, and unknown is not
            zero.
        bot_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Bot Name
          description: Docker bot name; controllers only
        controller_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Controller Id
          description: Controller ID, on both subjects
        executor_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Executor Id
          description: Executor ID; executors only
        executor_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Executor Type
          description: Executor type; executors only
        account_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Name
          description: Account name; executors only
        connector_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Connector Name
          description: Connector name; executors only
        trading_pair:
          anyOf:
            - type: string
            - type: 'null'
          title: Trading Pair
          description: Trading pair; executors only
        close_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Close Type
          description: Close type; set on an executor's terminal row
        performance:
          additionalProperties: true
          type: object
          title: Performance
          description: >-
            Controllers: the raw stored PerformanceReport. Empty for executors,
            whose metrics are all typed columns above.
        custom_info:
          additionalProperties: true
          type: object
          title: Custom Info
          description: >-
            Controllers: the raw stored custom_info. Empty for executors --
            these payloads carry fill_events and grid levels, which have no
            business in a per-minute row.
      type: object
      required:
        - timestamp
        - subject
        - scope_id
        - status
        - realized_pnl_quote
        - unrealized_pnl_quote
        - global_pnl_quote
        - global_pnl_pct
        - volume_quote
      title: PerformanceRow
      description: A single point of a performance series, for either subject.
    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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.