ORDER_CLOSE Command

Close partially or fully an order using the ticket number.

Help:

{
   "MSG":"HELP",
   "COMMAND":"ORDER_CLOSE",
   "DESCRIPTION":"Close any order using the TICKET number",
   "MANDATORY_TAGS":["TICKET (Integer)"],
   "OPTIONAL_TAGS":[
      "VOLUME (Double)",
       "PRICE (Double)",
       "SLIPPAGE (Double)"
   ]
}

Example:

Fully close

Single Line command (necessary for MTsocketAPI):

{"MSG":"ORDER_CLOSE", "TICKET":6549871}

Same command in Beauty Format:

{
    "MSG":"ORDER_CLOSE",
    "TICKET":6549871
}

MTsocketAPI reply:

{
    "MSG":"ORDER_CLOSE",
    "TICKET":47099135,
    "TYPE":"FULLY_CLOSED",
    "ERROR_ID":0,
    "ERROR_DESCRIPTION":"no error",
}

Partially close

Single Line command (necessary for MTsocketAPI):

{"MSG":"ORDER_CLOSE", "TICKET":6549871, "VOLUME": 0.01}

Same command in Beauty Format:

{
    "MSG":"ORDER_CLOSE",
    "TICKET":6549871,
    "VOLUME": 0.01
}

MTsocketAPI reply:

{
    "MSG":"ORDER_CLOSE",
    "TICKET":47099143,
    "TYPE":"PARTIALLY_CLOSED",
    "ERROR_ID":0,
    "ERROR_DESCRIPTION":"no error"
}