> ## 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.

# Get backtest trades

> Paginated list of individual trades from a backtest run.



## OpenAPI

````yaml /api/openapi.json get /api/graph/v1/backtest/{run_id}/trades
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/{run_id}/trades:
    get:
      tags:
        - Backtest
      summary: Get backtest trades
      description: Paginated list of individual trades from a backtest run.
      operationId: get_backtest_trades_api_graph_v1_backtest__run_id__trades_get
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Run Id
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Page Size
        - name: symbol
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Symbol
        - name: signal_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Signal Type
        - name: direction
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Direction
      responses:
        '200':
          description: Trades returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BacktestTradesPage'
        '404':
          description: Run not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    BacktestTradesPage:
      properties:
        trades:
          items:
            $ref: '#/components/schemas/BacktestTradeResponse'
          type: array
          title: Trades
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
      type: object
      required:
        - trades
        - total
        - page
        - page_size
      title: BacktestTradesPage
      description: Paginated list of backtest trades.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BacktestTradeResponse:
      properties:
        entry_time:
          type: string
          format: date-time
          title: Entry Time
        symbol:
          type: string
          title: Symbol
        signal_type:
          type: string
          title: Signal Type
        direction:
          type: string
          title: Direction
        trigger_price:
          type: number
          title: Trigger Price
        entry_price:
          type: number
          title: Entry Price
        exit_price:
          anyOf:
            - type: number
            - type: 'null'
          title: Exit Price
        stop_price:
          type: number
          title: Stop Price
        t1_price:
          anyOf:
            - type: number
            - type: 'null'
          title: T1 Price
        t2_price:
          anyOf:
            - type: number
            - type: 'null'
          title: T2 Price
        t3_price:
          anyOf:
            - type: number
            - type: 'null'
          title: T3 Price
        atr_at_entry:
          type: number
          title: Atr At Entry
        exit_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Exit Reason
        pnl:
          anyOf:
            - type: number
            - type: 'null'
          title: Pnl
        pnl_r:
          anyOf:
            - type: number
            - type: 'null'
          title: Pnl R
        round_trip_cost:
          type: number
          title: Round Trip Cost
          default: 0
        hold_minutes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Hold Minutes
        exit_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Exit Time
      type: object
      required:
        - entry_time
        - symbol
        - signal_type
        - direction
        - trigger_price
        - entry_price
        - stop_price
        - atr_at_entry
      title: BacktestTradeResponse
      description: Individual trade from a backtest run.
    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

````