> ## 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 Chat Context

> Assemble chat context from graph data and Qdrant vectors.



## OpenAPI

````yaml /api/openapi.json get /api/graph/v1/chat/context
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/chat/context:
    get:
      tags:
        - Chat
      summary: Get Chat Context
      description: Assemble chat context from graph data and Qdrant vectors.
      operationId: get_chat_context_api_graph_v1_chat_context_get
      parameters:
        - name: page_type
          in: query
          required: false
          schema:
            type: string
            description: Page type for context assembly
            default: default
            title: Page Type
          description: Page type for context assembly
        - name: symbol
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Stock symbol for context
            title: Symbol
          description: Stock symbol for context
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatContextResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ChatContextResponse:
      properties:
        page_type:
          type: string
          title: Page Type
        symbol:
          anyOf:
            - type: string
            - type: 'null'
          title: Symbol
        market_context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Market Context
        stock_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Stock Data
        debate_summary:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Debate Summary
        sector_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Sector Data
        historical_analogs:
          items:
            $ref: '#/components/schemas/app__models__chat__HistoricalAnalog'
          type: array
          title: Historical Analogs
          default: []
        strategy_playbooks:
          items:
            $ref: '#/components/schemas/StrategyPlaybook'
          type: array
          title: Strategy Playbooks
          default: []
      type: object
      required:
        - page_type
      title: ChatContextResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    app__models__chat__HistoricalAnalog:
      properties:
        symbol:
          type: string
          title: Symbol
        direction:
          type: string
          title: Direction
        outcome:
          type: string
          title: Outcome
        return_pct:
          type: number
          title: Return Pct
        confluence_score:
          type: number
          title: Confluence Score
        similarity:
          type: number
          title: Similarity
      type: object
      required:
        - symbol
        - direction
        - outcome
        - return_pct
        - confluence_score
        - similarity
      title: HistoricalAnalog
    StrategyPlaybook:
      properties:
        category:
          type: string
          title: Category
        content:
          type: string
          title: Content
        relevance:
          type: number
          title: Relevance
      type: object
      required:
        - category
        - content
        - relevance
      title: StrategyPlaybook
    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

````