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

# Receive Trade Update

> Receive a forwarded trade update event from the Go WebSocket consumer.

Validates auth, uses Go-computed dedup key, and delegates to process_trade_update().



## OpenAPI

````yaml /api/openapi.json post /api/internal/execution/trade-update
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/execution/trade-update:
    post:
      tags:
        - Internal Execution
      summary: Receive Trade Update
      description: >-
        Receive a forwarded trade update event from the Go WebSocket consumer.


        Validates auth, uses Go-computed dedup key, and delegates to
        process_trade_update().
      operationId: receive_trade_update_api_internal_execution_trade_update_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InternalTradeUpdatePayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties:
                  type: string
                type: object
                title: >-
                  Response Receive Trade Update Api Internal Execution Trade
                  Update Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    InternalTradeUpdatePayload:
      properties:
        user_id:
          type: string
          pattern: ^[0-9a-f-]{36}$
          title: User Id
        event_type:
          type: string
          pattern: >-
            ^(fill|partial_fill|canceled|rejected|expired|replaced|order_cancel_rejected|done_for_day)$
          title: Event Type
        order_id:
          type: string
          maxLength: 64
          pattern: ^[a-f0-9-]+$
          title: Order Id
        client_order_id:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Client Order Id
        filled_qty:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Filled Qty
        filled_avg_price:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Filled Avg Price
        filled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Filled At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        replaced_by:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Replaced By
        total_order_qty:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Total Order Qty
        fill_context:
          type: string
          pattern: ^(entry|exit)$
          title: Fill Context
          default: entry
        source:
          type: string
          pattern: ^(websocket)$
          title: Source
          default: websocket
        dedup_key:
          type: string
          pattern: ^[0-9a-f]{64}$
          title: Dedup Key
        received_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Received At
      type: object
      required:
        - user_id
        - event_type
        - order_id
        - dedup_key
      title: InternalTradeUpdatePayload
      description: |-
        Request model for POST /api/internal/execution/trade-update.

        Guarantees Decimal parsing for prices/quantities (QR-I1).
        Dedup key computed by Go, validated as 64-char hex (SEC-6c).
    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

````