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

# Create a new A/B experiment

> Create a new experiment with baseline configuration and success metrics.



## OpenAPI

````yaml /api/openapi.json post /api/uat/v1/experiments
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/uat/v1/experiments:
    post:
      tags:
        - UAT Testing
      summary: Create a new A/B experiment
      description: Create a new experiment with baseline configuration and success metrics.
      operationId: create_experiment_api_uat_v1_experiments_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UATExperimentCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UATExperiment'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UATExperimentCreate:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        hypothesis:
          anyOf:
            - type: string
            - type: 'null'
          title: Hypothesis
          description: What we're testing
        success_metrics:
          $ref: '#/components/schemas/SuccessMetrics'
        baseline_config:
          $ref: '#/components/schemas/ExperimentConfig'
        created_by:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
          title: Created By
      type: object
      required:
        - name
        - success_metrics
        - baseline_config
      title: UATExperimentCreate
      description: Request model for creating a new experiment.
    UATExperiment:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        hypothesis:
          anyOf:
            - type: string
            - type: 'null'
          title: Hypothesis
          description: What we're testing
        success_metrics:
          $ref: '#/components/schemas/SuccessMetrics'
        baseline_config:
          $ref: '#/components/schemas/ExperimentConfig'
        created_by:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
          title: Created By
        experiment_id:
          type: string
          format: uuid
          title: Experiment Id
        status:
          $ref: '#/components/schemas/ExperimentStatus'
          default: draft
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - name
        - success_metrics
        - baseline_config
        - experiment_id
        - created_at
        - updated_at
      title: UATExperiment
      description: Full experiment model with server-generated fields.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SuccessMetrics:
      properties:
        primary_metric:
          type: string
          title: Primary Metric
          description: Primary metric to evaluate (e.g., 'win_rate', 'total_pnl')
        threshold:
          anyOf:
            - type: number
            - type: 'null'
          title: Threshold
          description: Minimum improvement threshold
        p_value:
          type: number
          maximum: 1
          minimum: 0
          title: P Value
          description: Statistical significance threshold
          default: 0.05
      type: object
      required:
        - primary_metric
      title: SuccessMetrics
      description: Success criteria for an A/B experiment.
    ExperimentConfig:
      properties:
        version:
          type: string
          title: Version
          description: Rule version (e.g., 'v3.1.2')
        filters:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Filters
          description: Screener filters
        scoring:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Scoring
          description: Scoring configuration
        symbols:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Symbols
          description: Symbol filter for variant assignment
      type: object
      required:
        - version
      title: ExperimentConfig
      description: Configuration snapshot for experiment baseline or variant.
    ExperimentStatus:
      type: string
      enum:
        - draft
        - active
        - paused
        - completed
      title: ExperimentStatus
      description: A/B experiment lifecycle status.
    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

````