Skip to main content

Edit order

POST 

/v3/editorder

This endpoint allows editing an existing order for a currently listed Futures contract.

When editing an order, if the trailingStopMaxDeviation and trailingStopDeviationUnit parameters are sent unchanged, the system will recalculate a new stop price upon successful order modification.

Request

Body

required
    processBefore string

    The time before which the request should be processed, otherwise it is rejected.

    orderId string

    ID of the order you wish to edit. (Required if CliOrdId is not included)

    cliOrdId string

    The order identity that is specified from the user. It must be globally unique (Required if orderId is not included)

    size number

    The size associated with the order

    limitPrice number

    The limit price associated with the order. Must not exceed the tick size of the contract.

    stopPrice number

    The stop price associated with a stop order. Required if old orderType is stp. Must not exceed tick size of the contract. Note that for stp orders, limitPrice is also required and denotes the worst price at which the stp order can get filled.

    trailingStopMaxDeviation number

    Possible values: >= 0.1 and <= 50

    Only relevant for trailing stop orders. Maximum value of 50%, minimum value of 0.1% for 'PERCENT' 'maxDeviationUnit'.

    Is the maximum distance the trailing stop's trigger price may trail behind the requested trigger signal. It defines the threshold at which the trigger price updates.

    trailingStopDeviationUnit string

    Possible values: [PERCENT, QUOTE_CURRENCY]

    Only relevant for trailing stop orders.

    This defines how the trailing trigger price is calculated from the requested trigger signal. For example, if the max deviation is set to 10, the unit is 'PERCENT', and the underlying order is a sell, then the trigger price will never be more then 10% below the trigger signal. Similarly, if the deviation is 100, the unit is 'QUOTE_CURRENCY', the underlying order is a sell, and the contract is quoted in USD, then the trigger price will never be more than $100 below the trigger signal.

Responses

Schema
    oneOf
    serverTime string

    Server time in Coordinated Universal Time (UTC)

    result string

    Possible values: [success]

    editStatus object

    A structure containing information on the send order request

    orderId stringnull

    The unique identifier of the order

    cliOrdId stringnull

    The unique client order identifier.

    This field is returned only if the order has a client order ID.

    orderEvents object[]
  • Array [
  • oneOf
    type ApiOrderEventType (string)

    Possible values: [place, cancel, edit, reject, execution]

    Always place.

    order object

    The placed order.

    orderId string

    The UID associated with the order.

    cliOrdId stringnull

    The client order id or null if order does not have one.

    type string

    Possible values: [lmt, ioc, post, liquidation, assignment, stp, unwind, block]

    The order type

    symbol string

    The symbol of the Futures.

    side string

    Possible values: [buy, sell]

    The side associated with the order

    quantity number

    The quantity (size) associated with the order.

    filled number

    The total amount of the order that has been filled.

    limitPrice number

    The limit price associated with a limit order.

    reduceOnly boolean

    Is the order a reduce only order or not.

    timestamp string

    The date and time the order was placed.

    lastUpdateTimestamp string

    The date and time the order was edited.

    reducedQuantity numbernull

    The amount of quantity that was removed before placement or null if the order is not a reduce only.

  • ]
  • receivedTime stringnull

    The date and time the order was received

    status string

    Possible values: [edited, invalidSize, invalidPrice, insufficientAvailableFunds, selfFill, tooManySmallOrders, outsidePriceCollar, postWouldExecute, wouldNotReducePosition, orderForEditNotFound, orderForEditNotAStop]

    The status of the order, either of:

    • edited - The order was edited successfully
    • invalidSize - The order was not placed because size is invalid
    • invalidPrice - The order was not placed because limitPrice and/or stopPrice are invalid
    • insufficientAvailableFunds - The order was not placed because available funds are insufficient
    • selfFill - The order was not placed because it would be filled against an existing order belonging to the same account
    • tooManySmallOrders - The order was not placed because the number of small open orders would exceed the permissible limit
    • outsidePriceCollar - The limit order crosses the spread but is an order of magnitude away from the mark price - fat finger control
    • postWouldExecute - The post-only order would be filled upon placement, thus is cancelled
    • wouldNotReducePosition - The edit cannot be applied because the reduce only policy is violated. (Only for reduceOnly orders)
    • orderForEditNotFound - The requested order for edit has not been found
    • orderForEditNotAStop - The supplied stopPrice cannot be applied because order is not a stop order
Loading...