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

# Archive daily market context

> Snapshot today's market context to market_context_archive.

Gathers day type, VIX, index closes from existing tables and writes
one row. Optionally triggers Qdrant market_state_sync (COR-113).
Returns 202 immediately.



## OpenAPI

````yaml /api/openapi.json post /api/internal/market/archive
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/internal/market/archive:
    post:
      tags:
        - Internal
      summary: Archive daily market context
      description: |-
        Snapshot today's market context to market_context_archive.

        Gathers day type, VIX, index closes from existing tables and writes
        one row. Optionally triggers Qdrant market_state_sync (COR-113).
        Returns 202 immediately.
      operationId: trigger_market_archive_api_internal_market_archive_post
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/ArchiveRequest'
                - type: 'null'
              title: Body
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: >-
                  Response Trigger Market Archive Api Internal Market Archive
                  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ArchiveRequest:
      properties:
        trade_date:
          anyOf:
            - type: string
            - type: 'null'
          title: Trade Date
          description: ISO date to archive (defaults to today).
        trigger_sync:
          type: boolean
          title: Trigger Sync
          description: Whether to trigger Qdrant market_state_sync after archive.
          default: true
      type: object
      title: ArchiveRequest
      description: Request body for triggering market context archive.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````