> ## 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 unified market regime context

> Get unified market regime context combining V5 regime probability vector,
VIX context, vol regime, and GEX regime in a single response.

The V5 regime vector is the canonical regime state, computed by RegimeScorerV5
which ingests VIX, VolRegime, GEX, day type, and breadth. This endpoint surfaces
the full vector alongside its input signals for transparency.

Each source carries its own timestamp for staleness detection:
- regime_computed_at: when PD last computed the V5 vector
- vol_regime_as_of: vol regime snapshot (may be up to 30 min stale)
- gex_as_of: GEX snapshot timestamp

Partial results are returned if any source fails (with None fields).

Cached for 5 minutes.



## OpenAPI

````yaml /api/openapi.json get /api/graph/v1/market/regime
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/market/regime:
    get:
      tags:
        - Market
      summary: Get unified market regime context
      description: >-
        Get unified market regime context combining V5 regime probability
        vector,

        VIX context, vol regime, and GEX regime in a single response.


        The V5 regime vector is the canonical regime state, computed by
        RegimeScorerV5

        which ingests VIX, VolRegime, GEX, day type, and breadth. This endpoint
        surfaces

        the full vector alongside its input signals for transparency.


        Each source carries its own timestamp for staleness detection:

        - regime_computed_at: when PD last computed the V5 vector

        - vol_regime_as_of: vol regime snapshot (may be up to 30 min stale)

        - gex_as_of: GEX snapshot timestamp


        Partial results are returned if any source fails (with None fields).


        Cached for 5 minutes.
      operationId: get_market_regime_api_graph_v1_market_regime_get
      responses:
        '200':
          description: Unified regime context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketRegimeResponse'
        '504':
          description: Query timeout
components:
  schemas:
    MarketRegimeResponse:
      properties:
        regime_v5:
          anyOf:
            - $ref: '#/components/schemas/RegimeV5'
            - type: 'null'
          description: V5 regime probability vector from graph
        vix:
          anyOf:
            - $ref: '#/components/schemas/VIXContext'
            - type: 'null'
          description: VIX context
        day_classification:
          anyOf:
            - $ref: '#/components/schemas/DayClassification'
            - type: 'null'
          description: Day type classification
        vol_regime:
          anyOf:
            - $ref: '#/components/schemas/VolRegimeSnapshot'
            - type: 'null'
          description: Latest vol regime snapshot
        gex_regime:
          anyOf:
            - $ref: '#/components/schemas/GEXSnapshot'
            - type: 'null'
          description: Latest GEX snapshot
        regime_computed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Regime Computed At
          description: When the V5 regime was last computed
        vol_regime_as_of:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Vol Regime As Of
          description: Vol regime snapshot timestamp (30-min staleness possible)
        gex_as_of:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Gex As Of
          description: GEX snapshot timestamp
        regime_direction:
          anyOf:
            - type: string
            - type: 'null'
          title: Regime Direction
          description: 'Regime direction: BULL, SIDEWAYS, or BEAR'
        regime_volatility:
          anyOf:
            - type: string
            - type: 'null'
          title: Regime Volatility
          description: 'Regime volatility: HIGH or LOW'
        regime_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Regime Label
          description: Human-readable regime label (e.g., 'Steady Uptrend')
        regime_episode_day:
          anyOf:
            - type: integer
            - type: 'null'
          title: Regime Episode Day
          description: Consecutive days in current regime
        regime_shock:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Regime Shock
          description: Whether a transient shock override is active
        regime_slope_pctile:
          anyOf:
            - type: number
            - type: 'null'
          title: Regime Slope Pctile
          description: 0-100 percentile of 50d OLS slope
        regime_vol_pctile:
          anyOf:
            - type: number
            - type: 'null'
          title: Regime Vol Pctile
          description: 0-100 percentile of 20d Parkinson vol
        regime_slope_raw:
          anyOf:
            - type: number
            - type: 'null'
          title: Regime Slope Raw
          description: Annualized % OLS slope
        regime_vol_raw:
          anyOf:
            - type: number
            - type: 'null'
          title: Regime Vol Raw
          description: Annualized % Parkinson vol
        recommended_preset_trading:
          anyOf:
            - type: string
            - type: 'null'
          title: Recommended Preset Trading
          description: Recommended trading screener preset for current regime
        recommended_preset_investor:
          anyOf:
            - type: string
            - type: 'null'
          title: Recommended Preset Investor
          description: Recommended investor screener preset for current regime
        regime_stable_since:
          anyOf:
            - type: string
            - type: 'null'
          title: Regime Stable Since
          description: ISO timestamp of when current regime was computed
        market_conditions:
          items:
            type: string
          type: array
          title: Market Conditions
          description: Active market condition flags
        favored_strategies:
          items:
            type: string
          type: array
          title: Favored Strategies
          description: Strategy types favored in current conditions
      type: object
      title: MarketRegimeResponse
      description: >-
        Unified market regime context combining all regime signals.


        The V5 regime probability vector is canonical — computed by
        RegimeScorerV5

        in the pattern-detector, which already ingests VIX, VolRegime, GEX, day
        type,

        and breadth. This response surfaces the full vector alongside its input
        signals

        for transparency.
    RegimeV5:
      properties:
        strong_trend:
          anyOf:
            - type: number
            - type: 'null'
          title: Strong Trend
        mild_trend:
          anyOf:
            - type: number
            - type: 'null'
          title: Mild Trend
        rotation:
          anyOf:
            - type: number
            - type: 'null'
          title: Rotation
        vol_expand:
          anyOf:
            - type: number
            - type: 'null'
          title: Vol Expand
        compressed:
          anyOf:
            - type: number
            - type: 'null'
          title: Compressed
        transitional:
          anyOf:
            - type: number
            - type: 'null'
          title: Transitional
        dominant:
          anyOf:
            - type: string
            - type: 'null'
          title: Dominant
        confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Confidence
        computed_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Computed At
      type: object
      title: RegimeV5
      description: V5 regime state vector (shadow mode).
    VIXContext:
      properties:
        level:
          type: number
          minimum: 0
          title: Level
          description: Current VIX level
        sma_50:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Sma 50
          description: 50-day SMA of VIX
        percentile:
          anyOf:
            - type: number
              maximum: 100
              minimum: 0
            - type: 'null'
          title: Percentile
          description: VIX percentile vs 52-week range
        regime:
          $ref: '#/components/schemas/VIXRegime'
          description: Current VIX regime classification
        term_structure:
          $ref: '#/components/schemas/TermStructure'
          description: VIX term structure
        can_trade:
          type: boolean
          title: Can Trade
          description: False if in FEAR regime (trading paused)
          default: true
        size_adjustment:
          type: string
          title: Size Adjustment
          description: 'Position size guidance: ''-25%'', ''baseline'', ''+15%'', or ''pause'''
      type: object
      required:
        - level
        - regime
        - term_structure
        - size_adjustment
      title: VIXContext
      description: VIX-related context from MarketCondition vertex.
    DayClassification:
      properties:
        day_type:
          type: string
          enum:
            - trending
            - rotational
            - uncertain
          title: Day Type
          description: 'v3 day type: trending, rotational, or uncertain'
        day_type_detail:
          type: string
          enum:
            - strong_trend
            - trending
            - mixed
            - rotational
            - strong_rotational
          title: Day Type Detail
          description: >-
            5-point classification: strong_trend, trending, mixed, rotational,
            strong_rotational
          default: mixed
        day_type_confidence:
          type: integer
          maximum: 100
          minimum: 0
          title: Day Type Confidence
          description: Classification confidence 0-100 based on score differential
          default: 0
        trend_score:
          type: number
          maximum: 100
          minimum: 0
          title: Trend Score
          description: Trend strength score 0-100 (higher = stronger trend signals)
        rotation_score:
          type: number
          maximum: 100
          minimum: 0
          title: Rotation Score
          description: Rotation score 0-100 (higher = more rotational signals)
        strategy_bias:
          type: string
          title: Strategy Bias
          description: Suggested strategy category
        size_modifier:
          type: number
          maximum: 2
          minimum: 0.5
          title: Size Modifier
          description: Position size adjustment
          default: 1
        signals:
          items:
            type: string
          type: array
          title: Signals
          description: Active signals for the day
      type: object
      required:
        - day_type
        - trend_score
        - rotation_score
        - strategy_bias
      title: DayClassification
      description: Daily market classification from DayClassification vertex.
    VolRegimeSnapshot:
      properties:
        regime:
          type: string
          title: Regime
          description: Vol regime label (CRISIS, STRESSED, CAUTIOUS, etc.)
        regime_confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Regime Confidence
          description: Regime classification confidence
        term_structure:
          anyOf:
            - type: string
            - type: 'null'
          title: Term Structure
          description: CONTANGO, BACKWARDATION, or FLAT
        atm_iv:
          anyOf:
            - type: number
            - type: 'null'
          title: Atm Iv
          description: At-the-money implied volatility
        iv_rank_252d:
          anyOf:
            - type: number
            - type: 'null'
          title: Iv Rank 252D
          description: IV rank over 252 trading days
        iv_percentile_252d:
          anyOf:
            - type: number
            - type: 'null'
          title: Iv Percentile 252D
          description: IV percentile over 252 trading days
        realized_vol_20d:
          anyOf:
            - type: number
            - type: 'null'
          title: Realized Vol 20D
          description: 20-day realized volatility
        skew_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Skew Label
          description: STEEP, NORMAL, or FLAT_INVERTED
        vov_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Vov Label
          description: STABLE, MODERATE, or UNSTABLE
        time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Time
          description: Snapshot timestamp
      type: object
      required:
        - regime
      title: VolRegimeSnapshot
      description: Slim vol regime snapshot from vol_regime_snapshots table.
    GEXSnapshot:
      properties:
        gex_regime:
          type: string
          title: Gex Regime
          description: GEX regime (long_gamma or short_gamma)
        total_gex:
          anyOf:
            - type: number
            - type: 'null'
          title: Total Gex
          description: Total gamma exposure
        gamma_flip_strike:
          anyOf:
            - type: number
            - type: 'null'
          title: Gamma Flip Strike
          description: Strike where gamma flips sign
        pin_strike:
          anyOf:
            - type: number
            - type: 'null'
          title: Pin Strike
          description: Max positive gamma strike (pin)
        spot_price:
          anyOf:
            - type: number
            - type: 'null'
          title: Spot Price
          description: Spot price at computation time
        time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Time
          description: Snapshot timestamp
      type: object
      required:
        - gex_regime
      title: GEXSnapshot
      description: Slim GEX snapshot from gex_snapshots table.
    VIXRegime:
      type: string
      enum:
        - low_complacent
        - normal
        - elevated
        - fear
      title: VIXRegime
      description: VIX regime classification per metrology.
    TermStructure:
      type: string
      enum:
        - contango
        - backwardation
      title: TermStructure
      description: VIX term structure.

````