CancelReplaceOrderRequest

Note

For a more in depth documentation, you should check the comments from the protobuf file.

Purpose

Used to cancel existence order and replace with new order data.

Mandatory fields

The mandatory fields for the cancel and replace order request are new order data information:

  • orderIdToBeReplaced - number of order that need to be replaced

  • contract - name of instrument/contract

  • side - order on sell or buy, value has a Side type.

  • quantity - count of orders.

  • orderType - type or order (limit, market, stop, etc.), list of supported order type listed in OrderType enum.

  • lifeTime - type of order life time, value has a OrderLifeTime type.

  • price - the price at which the order will complete.

  • limitPrice - restriction on the maximum/minimum price

  • positionType - type of position (open/close), value has a PositionType type.

  • goodTillDate - date on which the order will expire (timestamp value)

  • moduleId - the name of the module from which you want to place the order

  • ignoreValidation - determine, if need to check validity of order.

  • fractionalQuantity - specify the fractional quantity (standart, mini, micro). Value has a FractionalQuantity type


Request example

const CancelReplaceOrderRequest {
        orderIdToBeReplaced: "115262",
        contract: "6BZ22",
        side: "BUY",
        quantity: 1,
        orderType: "LMT_ORDER_TYPE",
        lifeTime: "DAY_ORDER_LIFE_TIME",
        price: 0.75,
        positionType: "CLOSE",
        goodTillDate: "1637798400000",
        ignoreValidation: true
    }

Responses

Valid

The server will respond with a CancelReplaceOrderResponse.


Error

If some error happens, server will send response with type ServerErrorMessage.