Skip to content

ORDER_LIST Command

Get a list of opened and pending orders

Help
{
    "MSG":"HELP",
    "COMMAND":"ORDER_LIST",
    "DESCRIPTION":"Get a list of current opened/pending orders",
    "MANDATORY_TAGS":[null],
    "OPTIONAL_TAGS":[null]
}

Example

Single Line command (necessary for MTsocketAPI):

{"MSG":"ORDER_LIST"}
Same command in Beauty Format:

{
    "MSG":"ORDER_LIST"
}

MTsocketAPI reply:

{
  "MSG": "ORDER_LIST",
  "COUNT": 1,
  "OPENED": [
    {
      "TICKET": 3242463796,
      "OPEN_TIME": "2025.01.17 10:40:00.45",
      "TIME_UPDATE": "2025.01.17 10:40:00.45",
      "TYPE": "ORDER_TYPE_BUY",
      "MAGIC": 0,
      "IDENTIFIER": 3242463796,
      "REASON": 3,
      "VOLUME": 0.03,
      "PRICE_OPEN": 1.02959,
      "SL": 1.02,
      "TP": 0,
      "PRICE_CURRENT": 1.02987,
      "SWAP": 0,
      "PROFIT": 0.84,
      "SYMBOL": "EURUSD",
      "COMMENT": null,
      "EXTERNAL_ID": null,
      "CHANGE": 0.03
    }
  ],
  "PENDING": [],
  "ERROR_ID": 0,
  "ERROR_DESCRIPTION": "The operation completed successfully"
}