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

# Update an existing strategy

> Updates an existing strategy identified by its ID.



## OpenAPI

````yaml /api/swagger.json put /strategies/{strategy_id}
openapi: 3.0.1
info:
  title: BLOOD-V3 API
  contact: {}
  version: 0.0.1
servers:
  - url: //localhost:50000/api/v1
security: []
paths:
  /strategies/{strategy_id}:
    put:
      tags:
        - Strategies
      summary: Update an existing strategy
      description: Updates an existing strategy identified by its ID.
      parameters:
        - name: strategy_id
          in: path
          description: Strategy ID
          required: true
          schema:
            type: string
      requestBody:
        description: Strategy to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/handlers.updateStrategyRequest'
        required: true
      responses:
        '200':
          description: OK
          content: {}
        '400':
          description: Invalid request body or missing strategy ID
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
        '404':
          description: Strategy not found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
        '409':
          description: Strategy already exists
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
        '500':
          description: Internal server error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
components:
  schemas:
    handlers.updateStrategyRequest:
      type: object
      properties:
        strategy:
          $ref: '#/components/schemas/models.Strategy'
    handlers.ErrorResponse:
      type: object
      properties:
        error:
          type: string
    models.Strategy:
      type: object
      properties:
        id:
          type: string
        meta:
          type: array
          items:
            $ref: '#/components/schemas/models.StrategyMetadata'
    models.StrategyMetadata:
      type: object
      properties:
        dev_sell_percentage:
          type: string
        dev_sell_percentage_to_sell:
          type: string
        inactivity_percentage:
          type: string
        inactivity_percentage_to_sell:
          type: string
        inactivity_timeout_ms:
          type: string
        sl_percentage:
          type: string
        sl_percentage_to_sell:
          type: string
        timeout_ms:
          type: string
        timeout_percentage_to_sell:
          type: string
        tp_percentage:
          type: string
        tp_percentage_to_sell:
          type: string
        trailing_sl_percentage:
          type: string
        trailing_sl_percentage_to_sell:
          type: string

````