> ## 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 confluence scoring breakdown

> Get confluence scoring breakdown for a stock per SEQUENCY_TRADING_METROLOGY.md.

## Confluence Components (weights sum to 1.0)

1. **Proximity (0.25)**: Distance to key levels in ATR units
2. **Volatility Setup (0.20)**: Compression patterns + Bollinger width
3. **Volume Confirmation (0.20)**: Relative volume + trend
4. **Pattern Quality (0.15)**: Pattern confidence + type alignment
5. **IV Rank (0.10)**: IV percentile classification (requires options pipeline)
6. **Day Type Alignment (0.10)**: Strategy vs day type compatibility

## Score Tiers

- **EXCELLENT**: 8-10 (full position size recommended)
- **GOOD**: 6-8 (normal position size)
- **MODERATE**: 4-6 (reduced position size)
- **WEAK**: 2-4 (avoid or minimal size)
- **POOR**: 0-2 (do not trade)

## Query Parameters

- **strategy**: Optional strategy type to check alignment for
  (e.g., MomentumBreakout, TrendFollowing, MeanReversion)

## Performance Target

<300ms response time.



## OpenAPI

````yaml /api/openapi.json get /api/graph/v1/stocks/{symbol}/confluence
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/stocks/{symbol}/confluence:
    get:
      tags:
        - Stocks
      summary: Get confluence scoring breakdown
      description: >-
        Get confluence scoring breakdown for a stock per
        SEQUENCY_TRADING_METROLOGY.md.


        ## Confluence Components (weights sum to 1.0)


        1. **Proximity (0.25)**: Distance to key levels in ATR units

        2. **Volatility Setup (0.20)**: Compression patterns + Bollinger width

        3. **Volume Confirmation (0.20)**: Relative volume + trend

        4. **Pattern Quality (0.15)**: Pattern confidence + type alignment

        5. **IV Rank (0.10)**: IV percentile classification (requires options
        pipeline)

        6. **Day Type Alignment (0.10)**: Strategy vs day type compatibility


        ## Score Tiers


        - **EXCELLENT**: 8-10 (full position size recommended)

        - **GOOD**: 6-8 (normal position size)

        - **MODERATE**: 4-6 (reduced position size)

        - **WEAK**: 2-4 (avoid or minimal size)

        - **POOR**: 0-2 (do not trade)


        ## Query Parameters


        - **strategy**: Optional strategy type to check alignment for
          (e.g., MomentumBreakout, TrendFollowing, MeanReversion)

        ## Performance Target


        <300ms response time.
      operationId: get_confluence_api_graph_v1_stocks__symbol__confluence_get
      parameters:
        - name: symbol
          in: path
          required: true
          schema:
            type: string
            title: Symbol
        - name: strategy
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Strategy type to check alignment for
            title: Strategy
          description: Strategy type to check alignment for
      responses:
        '200':
          description: Confluence breakdown
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfluenceResponse'
        '404':
          description: Stock not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '504':
          description: Query timeout
components:
  schemas:
    ConfluenceResponse:
      properties:
        symbol:
          type: string
          title: Symbol
        confluence_score:
          type: number
          maximum: 100
          minimum: 0
          title: Confluence Score
          description: Weighted total score 0-100
        tier:
          $ref: '#/components/schemas/app__models__confluence__ConfluenceTier'
          description: Score tier classification
        components:
          $ref: '#/components/schemas/ConfluenceComponents'
        recommendation:
          type: string
          title: Recommendation
          description: Trading recommendation based on score and conditions
        weights_version:
          type: string
          title: Weights Version
          description: Version of the confluence weights formula used
          default: v3.1
      type: object
      required:
        - symbol
        - confluence_score
        - tier
        - components
        - recommendation
      title: ConfluenceResponse
      description: |-
        V3 Confluence scoring breakdown for trade setup quality assessment.

        Score ranges from 0-100, calculated as weighted sum of 6 components.

        For v4.1 dual scoring with 8 components, use DualConfluenceResponse.
      example:
        components:
          day_type_alignment:
            alignment: aligned
            day_type: trending
            score: 80
            weight: 0.1
          iv_rank:
            percentile: 35
            score: 70
            weight: 0.1
          pattern_quality:
            best_pattern: bull_flag
            confidence: 0.75
            score: 60
            weight: 0.15
          proximity:
            distance_atr: 0.3
            nearest_level: pivot_r1
            score: 80
            weight: 0.25
          volatility_setup:
            bb_width_percentile: 15
            patterns:
              - bb_squeeze
            score: 70
            weight: 0.2
          volume_confirmation:
            rvol: 1.5
            score: 85
            trend: increasing
            weight: 0.2
        confluence_score: 82.5
        recommendation: GOOD setup for momentum strategies.
        symbol: AAPL
        tier: GOOD
        weights_version: v3.1
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    app__models__confluence__ConfluenceTier:
      type: string
      enum:
        - EXCELLENT
        - GOOD
        - MODERATE
        - WEAK
        - POOR
      title: ConfluenceTier
      description: Confluence tier classification based on score.
    ConfluenceComponents:
      properties:
        proximity:
          $ref: '#/components/schemas/ProximityComponent'
        volatility_setup:
          $ref: '#/components/schemas/VolatilitySetupComponent'
        volume_confirmation:
          $ref: '#/components/schemas/VolumeConfirmationComponent'
        pattern_quality:
          $ref: '#/components/schemas/PatternQualityComponent'
        iv_rank:
          $ref: '#/components/schemas/IVRankComponent'
        day_type_alignment:
          $ref: '#/components/schemas/DayTypeAlignmentComponent'
      type: object
      required:
        - proximity
        - volatility_setup
        - volume_confirmation
        - pattern_quality
        - iv_rank
        - day_type_alignment
      title: ConfluenceComponents
      description: V3 confluence scoring components (6 components).
    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
    ProximityComponent:
      properties:
        score:
          type: number
          maximum: 100
          minimum: 0
          title: Score
          description: Component score 0-100
        weight:
          type: number
          title: Weight
          description: Component weight in total score
          default: 0.25
        nearest_level:
          anyOf:
            - type: string
            - type: 'null'
          title: Nearest Level
          description: Name of nearest level
        distance_atr:
          anyOf:
            - type: number
            - type: 'null'
          title: Distance Atr
          description: Distance to level in ATR units
      type: object
      required:
        - score
      title: ProximityComponent
      description: 'Proximity to key levels component (v3: 0.25, v4.1: 0.20).'
    VolatilitySetupComponent:
      properties:
        score:
          type: number
          maximum: 100
          minimum: 0
          title: Score
          description: Component score 0-100
        weight:
          type: number
          title: Weight
          description: Component weight in total score
          default: 0.2
        patterns:
          items:
            type: string
          type: array
          title: Patterns
          description: Active compression patterns
        bb_width_percentile:
          anyOf:
            - type: number
            - type: 'null'
          title: Bb Width Percentile
          description: Bollinger band width percentile
      type: object
      required:
        - score
      title: VolatilitySetupComponent
      description: 'Volatility setup component (v3: 0.20, v4.1: 0.15).'
    VolumeConfirmationComponent:
      properties:
        score:
          type: number
          maximum: 100
          minimum: 0
          title: Score
          description: Component score 0-100
        weight:
          type: number
          title: Weight
          description: Component weight in total score
          default: 0.2
        rvol:
          anyOf:
            - type: number
            - type: 'null'
          title: Rvol
          description: Relative volume
        trend:
          anyOf:
            - type: string
            - type: 'null'
          title: Trend
          description: Volume trend direction
      type: object
      required:
        - score
      title: VolumeConfirmationComponent
      description: 'Volume confirmation component (weight: 0.20).'
    PatternQualityComponent:
      properties:
        score:
          type: number
          maximum: 100
          minimum: 0
          title: Score
          description: Component score 0-100
        weight:
          type: number
          title: Weight
          description: Component weight in total score
          default: 0.15
        best_pattern:
          anyOf:
            - type: string
            - type: 'null'
          title: Best Pattern
          description: Highest confidence pattern
        confidence:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Confidence
          description: Pattern confidence
      type: object
      required:
        - score
      title: PatternQualityComponent
      description: 'Pattern quality component (weight: 0.15).'
    IVRankComponent:
      properties:
        score:
          type: number
          maximum: 100
          minimum: 0
          title: Score
          description: Component score 0-100
        weight:
          type: number
          title: Weight
          description: Component weight in total score
          default: 0.1
        percentile:
          anyOf:
            - type: number
              maximum: 100
              minimum: 0
            - type: 'null'
          title: Percentile
          description: IV percentile. Requires options pipeline.
          x-data-status: pending
      type: object
      required:
        - score
      title: IVRankComponent
      description: 'IV rank component (v3: 0.10, v4.1: 0.06).'
    DayTypeAlignmentComponent:
      properties:
        score:
          type: number
          maximum: 100
          minimum: 0
          title: Score
          description: Component score 0-100
        weight:
          type: number
          title: Weight
          description: Component weight in total score
          default: 0.1
        day_type:
          type: string
          title: Day Type
          description: Current day type classification
        alignment:
          type: string
          title: Alignment
          description: 'Alignment quality: ''aligned'', ''neutral'', or ''misaligned'''
      type: object
      required:
        - score
        - day_type
        - alignment
      title: DayTypeAlignmentComponent
      description: 'Day type alignment component (v3: 0.10, v4.1: 0.06).'

````