Skip to main content

Cancel order

POST 

/cancelorder

This endpoint allows cancelling an open order for a Futures contract.

Request

Query Parameters

    processBefore date-time

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

    Example: 2023-11-08 19:56:35.441899+00:00
    order_id string

    The unique identifier of the order to be cancelled.

    cliOrdId string

    The client unique identifier of the order to be cancelled.

Responses

Schema
    oneOf
    cancelStatus objectrequired

    A structure containing information on the cancellation request.

    cliOrdId stringnull

    The client order ID. Shown only if client specified one.

    orderEvents object[]
  • Array [
  • oneOf
    type stringrequired

    Possible values: [PLACE]

    Always PLACE.

    order objectrequired

    The placed order.

    orderId stringrequired

    The UID associated with the order.

    cliOrdId stringnullrequired

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

    type stringrequired

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

    The order type

    symbol stringrequired

    The symbol of the Futures.

    side stringrequired

    Possible values: [buy, sell]

    The side associated with the order

    quantity numberrequired

    The quantity (size) associated with the order.

    filled numberrequired

    The total amount of the order that has been filled.

    limitPrice numberrequired

    The limit price associated with a limit order.

    reduceOnly booleanrequired

    Is the order a reduce only order or not.

    timestamp stringrequired

    The date and time the order was placed.

    lastUpdateTimestamp stringrequired

    The date and time the order was edited.

    reducedQuantity numbernullrequired

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

  • ]
  • order_id uuid

    The cancelled order UID

    receivedTime string

    The date and time the order cancellation was received.

    status stringrequired

    Possible values: [cancelled, filled, notFound]

    The status of the order cancellation:

    • cancelled - The order has been cancelled. This may only be part of the order as part may have been filled. Check open_orders websocket feed for status of the order.
    • filled - The order was found completely filled and could not be cancelled
    • notFound - The order was not found, either because it had already been cancelled or it never existed
    result stringrequired

    Possible values: [success]

    serverTime date-timerequired

    Server time in Coordinated Universal Time (UTC)

Loading...