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

# List backtest history

> List the user's past backtest runs (most recent first).



## OpenAPI

````yaml /api/openapi.json get /api/graph/v1/backtest/history
openapi: 3.1.0
info:
  title: Sequency Graph API
  description: >

    # Sequency Graph-Native Trading API


    Graph-native API for trading intelligence, built on FalkorDB.


    ## Features


    - **Screener**: Filter stocks using graph-native queries with relationship
    expansion

    - **Stock Detail**: Complete stock context with all relationships

    - **Confluence Scoring**: Setup quality assessment with weighted components

    - **Strategy Matching**: Find matching options strategies via graph
    traversal

    - **Market Context**: Current market-wide context for trading decisions


    ## Data Sources


    All data is sourced from the FalkorDB knowledge graph, populated by:

    - Pattern detector (Go) - Technical indicators, patterns

    - Graph sync service - Levels, volume profiles, news, day classification
  version: 1.0.0
servers: []
security: []
paths:
  /api/graph/v1/backtest/history:
    get:
      tags:
        - Backtest
      summary: List backtest history
      description: List the user's past backtest runs (most recent first).
      operationId: list_backtest_history_api_graph_v1_backtest_history_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 50
            title: Limit
      responses:
        '200':
          description: Run history returned
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BacktestRunResponse'
                title: >-
                  Response List Backtest History Api Graph V1 Backtest History
                  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    BacktestRunResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        status:
          $ref: '#/components/schemas/BacktestStatus'
        symbols:
          items:
            type: string
          type: array
          title: Symbols
        start_date:
          type: string
          format: date
          title: Start Date
        end_date:
          type: string
          format: date
          title: End Date
        signal_types:
          items:
            type: string
          type: array
          title: Signal Types
        stop_atr_mult:
          type: number
          title: Stop Atr Mult
        t1_atr_mult:
          type: number
          title: T1 Atr Mult
        t2_atr_mult:
          type: number
          title: T2 Atr Mult
        t3_atr_mult:
          type: number
          title: T3 Atr Mult
        time_stop_et:
          type: string
          title: Time Stop Et
        total_trades:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Trades
        win_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Win Count
        loss_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Loss Count
        win_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Win Rate
        avg_rr_ratio:
          anyOf:
            - type: number
            - type: 'null'
          title: Avg Rr Ratio
        total_pnl:
          anyOf:
            - type: number
            - type: 'null'
          title: Total Pnl
        max_drawdown:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Drawdown
        profit_factor:
          anyOf:
            - type: number
            - type: 'null'
          title: Profit Factor
        sharpe_ratio:
          anyOf:
            - type: number
            - type: 'null'
          title: Sharpe Ratio
        by_signal_type:
          anyOf:
            - items:
                $ref: '#/components/schemas/SignalTypeMetrics'
              type: array
            - type: 'null'
          title: By Signal Type
        by_symbol:
          anyOf:
            - items:
                $ref: '#/components/schemas/SymbolMetrics'
              type: array
            - type: 'null'
          title: By Symbol
        equity_curve:
          anyOf:
            - items:
                $ref: '#/components/schemas/EquityCurvePoint'
              type: array
            - type: 'null'
          title: Equity Curve
        validation_gate:
          anyOf:
            - $ref: '#/components/schemas/ValidationGateResult'
            - type: 'null'
        progress_pct:
          type: integer
          title: Progress Pct
          default: 0
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        created_at:
          type: string
          format: date-time
          title: Created At
        analysis_result:
          anyOf:
            - $ref: '#/components/schemas/BacktestAnalysisResponse'
            - type: 'null'
        position_size:
          type: integer
          title: Position Size
          default: 100
        slippage_per_share:
          type: number
          title: Slippage Per Share
          default: 0
        commission_per_share:
          type: number
          title: Commission Per Share
          default: 0
        by_exit_reason:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: By Exit Reason
        advanced_metrics:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Advanced Metrics
        benchmark_curve:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Benchmark Curve
      type: object
      required:
        - id
        - status
        - symbols
        - start_date
        - end_date
        - signal_types
        - stop_atr_mult
        - t1_atr_mult
        - t2_atr_mult
        - t3_atr_mult
        - time_stop_et
        - created_at
      title: BacktestRunResponse
      description: Full backtest run status and results.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BacktestStatus:
      type: string
      enum:
        - pending
        - running
        - completed
        - failed
        - cancelled
      title: BacktestStatus
      description: Backtest run lifecycle status.
    SignalTypeMetrics:
      properties:
        signal_type:
          type: string
          title: Signal Type
        total_trades:
          type: integer
          title: Total Trades
        win_count:
          type: integer
          title: Win Count
        loss_count:
          type: integer
          title: Loss Count
        win_rate:
          type: number
          title: Win Rate
        avg_pnl_r:
          type: number
          title: Avg Pnl R
        expectancy_per_r:
          type: number
          title: Expectancy Per R
          default: 0
        total_pnl:
          type: number
          title: Total Pnl
      type: object
      required:
        - signal_type
        - total_trades
        - win_count
        - loss_count
        - win_rate
        - avg_pnl_r
        - total_pnl
      title: SignalTypeMetrics
      description: Performance metrics broken down by signal type.
    SymbolMetrics:
      properties:
        symbol:
          type: string
          title: Symbol
        total_trades:
          type: integer
          title: Total Trades
        win_count:
          type: integer
          title: Win Count
        loss_count:
          type: integer
          title: Loss Count
        win_rate:
          type: number
          title: Win Rate
        total_pnl:
          type: number
          title: Total Pnl
        max_drawdown:
          type: number
          title: Max Drawdown
      type: object
      required:
        - symbol
        - total_trades
        - win_count
        - loss_count
        - win_rate
        - total_pnl
        - max_drawdown
      title: SymbolMetrics
      description: Performance metrics broken down by symbol.
    EquityCurvePoint:
      properties:
        trade_num:
          type: integer
          title: Trade Num
        cumulative_pnl:
          type: number
          title: Cumulative Pnl
        cumulative_r:
          type: number
          title: Cumulative R
        timestamp:
          anyOf:
            - type: string
            - type: 'null'
          title: Timestamp
      type: object
      required:
        - trade_num
        - cumulative_pnl
        - cumulative_r
      title: EquityCurvePoint
      description: Single point on the equity curve.
    ValidationGateResult:
      properties:
        passed:
          type: boolean
          title: Passed
        criteria:
          items:
            $ref: '#/components/schemas/ValidationCriterion'
          type: array
          title: Criteria
      type: object
      required:
        - passed
        - criteria
      title: ValidationGateResult
      description: Aggregate validation gate result.
    BacktestAnalysisResponse:
      properties:
        summary:
          type: string
          title: Summary
        signal_insights:
          items:
            $ref: '#/components/schemas/SignalInsight'
          type: array
          title: Signal Insights
        risk_assessment:
          type: string
          title: Risk Assessment
        parameter_suggestions:
          items:
            type: string
          type: array
          title: Parameter Suggestions
        edge_quality:
          type: string
          title: Edge Quality
        edge_confidence:
          type: number
          maximum: 100
          minimum: 0
          title: Edge Confidence
        analyzed_at:
          type: string
          title: Analyzed At
        tokens_used:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tokens Used
      type: object
      required:
        - summary
        - signal_insights
        - risk_assessment
        - parameter_suggestions
        - edge_quality
        - edge_confidence
        - analyzed_at
      title: BacktestAnalysisResponse
      description: Structured response from the backtest analysis LLM agent.
    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
    ValidationCriterion:
      properties:
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        threshold:
          type: string
          title: Threshold
        actual:
          type: string
          title: Actual
        passed:
          type: boolean
          title: Passed
      type: object
      required:
        - name
        - description
        - threshold
        - actual
        - passed
      title: ValidationCriterion
      description: Single criterion in the validation gate.
    SignalInsight:
      properties:
        signal_type:
          type: string
          title: Signal Type
        assessment:
          type: string
          title: Assessment
        reasoning:
          type: string
          title: Reasoning
        suggestion:
          type: string
          title: Suggestion
      type: object
      required:
        - signal_type
        - assessment
        - reasoning
        - suggestion
      title: SignalInsight
      description: Per-signal-type insight from the backtest analysis agent.

````