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

# Edit algo order

> edit algo order

**Limit: 5 requests per 1 second**\
Edit algo order by algo order id.


## OpenAPI

````yaml PUT /v3/trade/algoOrder
openapi: 3.0.2
info:
  title: Swagger Petstore - OpenAPI 3.0
  description: >-
    This is a sample Pet Store Server based on the OpenAPI 3.0 specification. 
    You can find out more about

    Swagger at [http://swagger.io](http://swagger.io). In the third iteration of
    the pet store, we've switched to the design first approach!

    You can now help us improve the API whether it's by making changes to the
    definition itself or to the code.

    That way, with time, we can improve the API in general, and expose some of
    the new features in OAS3.


    Some useful links:

    - [The Pet Store
    repository](https://github.com/swagger-api/swagger-petstore)

    - [The source API definition for the Pet
    Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Team
    email: apiteam@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.19
servers:
  - url: https://api.woox.io/
security: []
externalDocs:
  description: Find out more about Swagger
  url: http://swagger.io
paths:
  /v3/trade/algoOrder:
    put:
      description: edit algo order
      parameters:
        - $ref: '#/components/parameters/ApiKeyHeader'
        - $ref: '#/components/parameters/SignatureHeader'
        - $ref: '#/components/parameters/TimestampHeader'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/stop_order'
                - $ref: '#/components/schemas/oco_order'
                - $ref: '#/components/schemas/trailing_stop'
                - $ref: '#/components/schemas/positional_tp_sl'
                - $ref: '#/components/schemas/tp_sl'
                - $ref: '#/components/schemas/bracket'
                - $ref: '#/components/schemas/stop_bracket'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EditOrderResponse'
      security: []
components:
  parameters:
    ApiKeyHeader:
      name: x-api-key
      in: header
      required: true
      schema:
        type: string
        example: abcdef123456
      description: api-key
    SignatureHeader:
      name: x-api-signature
      in: header
      required: true
      schema:
        type: string
        example: signaturestring
      description: api-signature
    TimestampHeader:
      name: x-api-timestamp
      in: header
      required: true
      schema:
        type: string
        example: '1718943200000'
      description: api-timestamp
  schemas:
    stop_order:
      description: ''
      title: Stop
      allOf:
        - $ref: '#/components/schemas/common_algo'
        - type: object
          properties:
            triggerPrice:
              type: string
              description: New trigger price
            triggerPriceType:
              type: string
              description: >-
                New trigger price type, currently only support MARKET_PRICE
                (i.e. last price) 
            price:
              type: string
              description: New order price, only applicable if type is LIMIT
    oco_order:
      description: ''
      title: OCO
      allOf:
        - $ref: '#/components/schemas/common_algo'
        - type: object
          properties:
            price:
              type: string
              description: New order price of the LIMIT order
            childOrders:
              type: array
              description: Details of the trigger order
              items:
                type: object
                properties:
                  triggerPrice:
                    type: string
                    description: New trigger price
                  triggerPriceType:
                    type: string
                    description: >-
                      New trigger price type, currently only support
                      MARKET_PRICE (i.e. last price)
                  price:
                    type: string
                    description: >-
                      New order price, only applicable if trigger order type is
                      LIMIT
    trailing_stop:
      description: ''
      title: Trailing stop
      allOf:
        - $ref: '#/components/schemas/common_algo'
        - type: object
          properties:
            activatedPrice:
              type: string
              description: New activated price for TRAILING_STOP order
            triggerPriceType:
              type: boolean
              description: >-
                New trigger price type, currently only support MARKET_PRICE
                (i.e. last price);  Effective on activatedPrice 
            callbackRate:
              type: string
              description: >-
                New trailing rate for TRAILING_STOP order;  Editing from using
                callbackRate to using callbackValue or vice versa is not allowed
            callbackValue:
              type: string
              description: >-
                New trailing value for TRAILING_STOP order;  Editing from using
                callbackRate to using callbackValue or vice versa is not allowed
    positional_tp_sl:
      description: ''
      title: Positional TP/SL
      allOf:
        - $ref: '#/components/schemas/common_algo'
        - type: object
          properties:
            childOrders:
              type: array
              description: Details of the TAKE_PROFIT and the STOP_LOSS order
              items:
                type: object
                properties:
                  algoOrderId:
                    type: string
                    description: Algo order Id of the TAKE_PROFIT or the STOP_LOSS order
                  triggerPrice:
                    type: string
                    description: New trigger price
                  triggerPriceType:
                    type: string
                    description: >-
                      New trigger price type, currently only support
                      MARKET_PRICE (i.e. last price)
    tp_sl:
      description: ''
      title: TP/SL
      allOf:
        - $ref: '#/components/schemas/common_algo'
        - type: object
          properties:
            childOrders:
              type: array
              description: Details of the TAKE_PROFIT and the STOP_LOSS order
              items:
                type: object
                properties:
                  algoOrderId:
                    type: string
                    description: Algo order Id of the TAKE_PROFIT or the STOP_LOSS order
                  triggerPrice:
                    type: string
                    description: New trigger price
                  triggerPriceType:
                    type: string
                    description: >-
                      New trigger price type, currently only support
                      MARKET_PRICE (i.e. last price)
    bracket:
      description: ''
      title: Bracket
      allOf:
        - $ref: '#/components/schemas/common_algo'
        - type: object
          properties:
            price:
              type: string
              description: >-
                Order price of the initial order, only applicable if the initial
                order type is LIMIT
            childOrders:
              type: array
              description: Details of the Positional_TP_SL or the TP_SL order
              items:
                type: object
                properties:
                  algoOrderId:
                    type: string
                    description: Algo order Id of the Positional_TP_SL or the TP_SL order
                  triggerPrice:
                    type: string
                    description: New trigger price
                  triggerPriceType:
                    type: string
                    description: >-
                      New trigger price type, currently only support
                      MARKET_PRICE (i.e. last price)
    stop_bracket:
      description: ''
      title: Stop bracket
      allOf:
        - $ref: '#/components/schemas/common_algo'
        - type: object
          properties:
            price:
              type: string
              description: >-
                Order price of the initial order, only applicable if the initial
                order type is LIMIT
            triggerPrice:
              type: string
              description: Trigger price of the initial stop order
            triggerPriceType:
              type: string
              description: >-
                Trigger price type of the initial stop order, currently only
                support MARKET_PRICE (i.e. last price)
            childOrders:
              type: array
              description: >-
                Attached TP/SL orders, only support 1 set of POSITIONAL_TP_SL or
                TP_SL
              items:
                type: object
                properties:
                  algoOrderId:
                    type: string
                    description: Algo order Id of the Positional_TP_SL or the TP_SL order
                  childOrders:
                    type: array
                    description: >-
                      Details of the TP/SL information, can contain at most 1
                      TAKE_PROFIT and 1 STOP_LOSS
                    items:
                      type: object
                      properties:
                        algoOrderId:
                          type: string
                          description: >-
                            Algo order Id of the TAKE_PROFIT or the STOP_LOSS
                            order
                        triggerPrice:
                          type: string
                          description: New trigger price
                        triggerPriceType:
                          type: string
                          description: >-
                            New trigger price type, currently only support
                            MARKET_PRICE (i.e. last price)
    EditOrderResponse:
      allOf:
        - $ref: '#/components/schemas/CommonResponse'
        - type: object
          properties:
            data:
              type: object
              properties:
                status:
                  type: string
                  description: ''
                  enum:
                    - NEW
                    - CANCELLED
                    - PARTIAL_FILLED
                    - FILLED
                    - REJECTED
                    - INCOMPLETE
                    - COMPLETED
    common_algo:
      type: object
      properties:
        algoOrderId:
          type: integer
          description: >-
            Algo order Id; Either algoOrderId or clientOrderId is required. If
            both are passed, algoOrderId will be used.
        clientAlgoOrderId:
          type: integer
          description: >-
            Algo order client order Id; Either algoOrderId or clientAlgoOrderId
            is required. If both are passed, algoOrderId will be used.
        quantity:
          type: string
          description: Order quantity, not required for POSITIONAL_TP_SL order
        visibleQuantity:
          type: integer
          description: >-
            The order quantity shown on orderbook;  for POSITIONAL_TP_SL order,
            visibleQuantity applies directly to the child orders
    CommonResponse:
      type: object
      properties:
        success:
          type: boolean
          description: 'true'
        timestamp:
          type: integer
          description: timestamp

````