Order Closed Failure

This order message can occur if:-

  • an order has already been matched by the time the cancel order command is recieved and processed by the exchange which means this order is no longer active and therefore cannot be closed.

  • multiple cancel order commands for the same orderID have been sent in quick sucession to the exchange by mistake and only the first cancel order command is accepted and processed by the exchange which means this order is no longer active and therefore cannot be closed again.

  • For more error messages and code, you can see them here Error Codes

Curl
{
  "event": "CANCEL", 
  "submitted": False, 
  "message": "Order request was rejected : REJECT_CANCEL_ORDER_ID_NOT_FOUND", 
  "code": "100004", 
  "timestamp": "0", 
  "data": {
            "clientOrderId": 3,
            "orderId": 3330802124194931673, 
            "displayQuantity": 0.0, 
            "lastMatchPrice": 0.0, 
            "lastMatchQuantity": 0.0, 
            "lastMatchedOrderId": 0, 
            "lastMatchedOrderId2": 0, 
            "matchedId": 0, 
            "matchedType": "MAKER", 
            "remainQuantity": 0.0, 
            "side": "BUY", 
            "status": "REJECT_CANCEL_ORDER_ID_NOT_FOUND", 
            "timeCondition": "GTC", 
            "marketCode": "BTC-USD-SWAP-LIN", 
            "timestampEpochMs": 1615377638518, 
            "orderType": "LIMIT",
            "price": 0.0, 
            "quantity": 0.0, 
            "isTriggered": False
          }
}

Channel Update Fields

Fields
Type
Description

event

STRING

submitted

BOOL

message

STRING

code

STRING

timestamp

STRING

data

LIST of dictionary

clientOrderId

STRING

Client assigned ID to help manage and identify orders with max value 9223372036854775807

orderId

STRING

Unique order ID from the exchange

displayQuantity

DECIMAL

lastMatchPrice

DECIMAL

lastMatchQuantity

DECIMAL

lastMatchedOrderId

DECIMAL

lastMatchedOrderId2

DECIMAL

matchedId

DECIMAL

matchedType

STRING

remainQuantity

DECIMAL

Historical remaining quantity of the closed order

side

STRING

status

STRING

timeCondition

STRING

marketCode

STRING

timestampEpochMs

LONG

orderType

STRING

price

DECIMAL

LIMIT or STOP_LIMIT

quantity

DECIMAL

isTriggered

BOOL

False or True

Last updated