Skip to content

ORDER_INFO Command

Get information from a pending or opened order

Help
{
    "MSG":"HELP",
    "COMMAND":"ORDER_INFO",
    "DESCRIPTION":"Get information from a pending or opened order using the TICKET number",
    "MANDATORY_TAGS":[
        "TICKET (Integer)"
    ],
    "OPTIONAL_TAGS":[null],
    "ERROR_ID":0,
    "ERROR_DESCRIPTION":"The operation completed successfully"
}

Example

Single Line command (necessary for MTsocketAPI):

{"MSG":"ORDER_INFO", "TICKET":3217392064}

Same command in Beauty Format:

{
    "MSG":"ORDER_INFO",
    "TICKET":3217392064
}

MTsocketAPI reply:

{
   "MSG":"ORDER_INFO",
   "OPENED":[
      {
         "TICKET":3217392064,
         "OPEN_TIME":"2025.01.09 20:29:03.135",
         "TIME_UPDATE":"2025.01.09 20:29:03.135",
         "TYPE":"ORDER_TYPE_BUY",
         "MAGIC":0,
         "IDENTIFIER":3217392064,
         "REASON":0,
         "VOLUME":0.01,
         "PRICE_OPEN":1.02993,
         "SL":0.00000,
         "TP":0.00000,
         "PRICE_CURRENT":1.03009,
         "SWAP":0.00,
         "PROFIT":0.16,
         "SYMBOL":"EURUSD",
         "COMMENT":null,
         "EXTERNAL_ID":null,
         "CHANGE":0.02
      }
   ],
   "PENDING":[],
   "ERROR_ID":0,
   "ERROR_DESCRIPTION":"The operation completed successfully"
}