> ## Documentation Index
> Fetch the complete documentation index at: https://docs.itoflow.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a paper strategy

> Creates a paper strategy, optionally linked to an existing managed paper portfolio. Provide constraints.min_position_pct, max_position_pct, and max_positions; select at least one market, asset class, sector, or included symbol through allocationGuidance or universe. Omitted optional controls receive server defaults returned as effectiveConstraints and effectiveRules. activateImmediately=false creates a paused strategy even though isActive=true means it exists.

Operation ID: post__strategies.



## OpenAPI

````yaml /openapi/itoflow-public.openapi.json post /strategies
openapi: 3.1.0
info:
  description: >-
    All Itoflow APIs are experimental and may change without notice. Read-only
    operations marked interactive can be tried from the documentation; the
    others are reference-only.
  title: Itoflow Developer API
  version: 1.0.0
servers:
  - description: Itoflow API
    url: https://api.itoflow.ai
security: []
tags:
  - name: Account
  - name: Billing
  - name: Brokers
  - name: Chat
  - name: Connected MCP servers
  - name: GitHub
  - name: Market data
  - name: Monitors
  - name: Notifications
  - name: Portfolios
  - name: Risk runs
  - name: Sharing and data
  - name: Strategies
paths:
  /strategies:
    post:
      tags:
        - Strategies
      summary: Create a paper strategy
      description: >-
        Creates a paper strategy, optionally linked to an existing managed paper
        portfolio. Provide constraints.min_position_pct, max_position_pct, and
        max_positions; select at least one market, asset class, sector, or
        included symbol through allocationGuidance or universe. Omitted optional
        controls receive server defaults returned as effectiveConstraints and
        effectiveRules. activateImmediately=false creates a paused strategy even
        though isActive=true means it exists.


        Operation ID: post__strategies.
      operationId: post__strategies
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StrategyCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateStrategyResponse'
          description: Strategy created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Validation error
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Portfolio not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Conflict
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Server error
      security:
        - bearerAuth: []
components:
  schemas:
    StrategyCreateRequest:
      properties:
        activateImmediately:
          description: >-
            Defaults to false. False creates an existing but paused strategy;
            executionStatus, not isActive, controls running.
          type: boolean
        allocationGuidance:
          $ref: '#/components/schemas/AllocationGuidanceRequest'
        constraints:
          $ref: '#/components/schemas/StrategyCreateConstraints'
        currency:
          type: string
        description:
          type: string
        initialCapital:
          anyOf:
            - type: string
            - type: number
        name:
          type: string
        portfolioId:
          format: uuid
          type: string
        rules:
          $ref: '#/components/schemas/StrategyRules'
        sourceChatId:
          type:
            - string
            - 'null'
        strategyContent:
          type: string
        universe:
          description: >-
            Included qualified symbols. At least one selector is required here
            or in allocationGuidance.
          items:
            type: string
          type: array
      required:
        - constraints
        - strategyContent
      type: object
    CreateStrategyResponse:
      properties:
        createdAt:
          type: string
        effectiveConstraints:
          $ref: '#/components/schemas/EffectiveStrategyConstraints'
        effectiveRules:
          $ref: '#/components/schemas/EffectiveStrategyRules'
        executionStatus:
          type: string
        id:
          format: uuid
          type: string
        isActive:
          description: >-
            True means the strategy exists and is not archived; inspect
            executionStatus to determine whether it runs.
          type: boolean
        name:
          type: string
        portfolioId:
          format: uuid
          type: string
      required:
        - id
        - name
        - portfolioId
        - isActive
        - executionStatus
        - effectiveConstraints
        - effectiveRules
        - createdAt
      type: object
    Error:
      properties:
        available:
          description: Optional available amount or value
          type: string
        billing_action:
          $ref: '#/components/schemas/BillingAction'
        code:
          description: Machine-readable error code
          type: string
        currentVersion:
          description: Current server-side version, when relevant
          type: number
        details:
          description: Optional structured error details
        error:
          description: Error type or code
          type: string
        expectedVersion:
          description: Client-provided expected version, when relevant
          type: number
        message:
          description: Human-readable error message
          type: string
        requested:
          description: Optional requested amount or value
          type: string
        usage:
          description: Optional usage metadata for limit errors
      required:
        - error
      type: object
    AllocationGuidanceRequest:
      description: >-
        Provide at least one market, asset class, sector, or included symbol
        here or through universe. Required to select a tradable scope even
        though this field is conditionally optional.
      properties:
        asset_classes:
          items:
            type: string
          type: array
        created_at:
          type: string
        is_strict:
          type: boolean
        markets:
          items:
            type: string
          type: array
        notes:
          type: string
        pattern:
          enum:
            - market_based
          type: string
        sectors:
          items:
            type: string
          type: array
        symbols_avoid:
          items:
            type: string
          type: array
        symbols_include:
          items:
            type: string
          type: array
      required:
        - pattern
      type: object
    StrategyCreateConstraints:
      description: >-
        Creation requires min_position_pct, max_position_pct, and max_positions.
        Other omitted fields use server defaults, including min_cash_pct=0.05,
        max_drawdown_pct=0.15, and stop_on_drawdown=true. The create response
        returns the effective values.
      properties:
        allowed_exchanges:
          items:
            type: string
          type:
            - array
            - 'null'
        blocked_symbols:
          items:
            type: string
          type:
            - array
            - 'null'
        is_strict:
          type: boolean
        max_drawdown_pct:
          type: number
        max_position_pct:
          type: number
        max_positions:
          type: integer
        min_cash_pct:
          minimum: 0
          type: number
        min_position_pct:
          type: number
        stop_loss_pct:
          type:
            - number
            - 'null'
        stop_on_drawdown:
          type: boolean
      required:
        - max_position_pct
        - max_positions
        - min_position_pct
      type: object
    StrategyRules:
      description: >-
        On creation, omitted rebalance_frequency and rebalance_time_utc default
        to daily and 21:00 UTC. The create response returns the effective rules.
      properties:
        lookback_days:
          type: integer
        model_key:
          enum:
            - luna
            - sol
            - sol61
            - astra
            - sonnet55
            - opus55
            - terra61
            - haiku55
            - fusion_deep
            - fusion_quick
            - fusion_light
          type: string
        rebalance_frequency:
          enum:
            - daily
            - weekly
            - monthly
          type: string
        rebalance_time_utc:
          type: string
      type:
        - object
        - 'null'
    EffectiveStrategyConstraints:
      description: All constraints applied at creation, including server defaults.
      properties:
        allowed_exchanges:
          items:
            type: string
          type:
            - array
            - 'null'
        blocked_symbols:
          items:
            type: string
          type:
            - array
            - 'null'
        is_strict:
          type: boolean
        max_drawdown_pct:
          type: number
        max_position_pct:
          type: number
        max_positions:
          type: integer
        min_cash_pct:
          type: number
        min_position_pct:
          type: number
        stop_loss_pct:
          type:
            - number
            - 'null'
        stop_on_drawdown:
          type: boolean
      required:
        - allowed_exchanges
        - blocked_symbols
        - is_strict
        - max_drawdown_pct
        - max_position_pct
        - max_positions
        - min_cash_pct
        - min_position_pct
        - stop_loss_pct
        - stop_on_drawdown
      type: object
    EffectiveStrategyRules:
      description: Rules applied at creation, including default rebalance settings.
      properties:
        lookback_days:
          type: integer
        model_key:
          enum:
            - luna
            - sol
            - sol61
            - astra
            - sonnet55
            - opus55
            - terra61
            - haiku55
            - fusion_deep
            - fusion_quick
            - fusion_light
          type: string
        rebalance_frequency:
          enum:
            - daily
            - weekly
            - monthly
          type: string
        rebalance_time_utc:
          type: string
      required:
        - rebalance_frequency
        - rebalance_time_utc
      type: object
    BillingAction:
      description: Action that resolves a billing-related rejection
      properties:
        href:
          type: string
        kind:
          enum:
            - upgrade
            - payment_method
            - spending_cap
            - billing
          type: string
        label:
          type: string
      required:
        - href
        - label
        - kind
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: Itoflow access token issued for the Itoflow API.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.