ORDER_LIST

Description

Lists pending and opened orders.

Important

All JSON commands you send to MetaSocket should be in a single line format similar to the examples below. Additionally, example replies in this page are presented in a "beautified" format for presentation purposes. Actual replies are always returned in a single line.

Example

{"MSG": "ORDER_LIST"}

Reply

{
"MSG": "ORDER_LIST",
"COUNT": 2,
"OPENED": [
{
"TICKET": 51562679,
"OPEN_TIME": "2025.09.18 16:06",
"TIME_UPDATE": "2025.09.18 16:06",
"TYPE": "ORDER_TYPE_BUY",
"MAGIC": 12345,
"IDENTIFIER": 51562679,
"REASON": 3,
"VOLUME": 0.1,
"PRICE_OPEN": 1.17878,
"SL": 1.095,
"TP": 1.205,
"PRICE_CURRENT": 1.17858,
"SWAP": 0,
"PROFIT": -2,
"SYMBOL": "EURUSD.s",
"COMMENT": "Buy market order",
"EXTERNAL_ID": null,
"CHANGE": 0
},
{
"TICKET": 51562725,
"OPEN_TIME": "2025.09.18 16:06",
"TIME_UPDATE": "2025.09.18 16:06",
"TYPE": "ORDER_TYPE_BUY",
"MAGIC": 67890,
"IDENTIFIER": 51562725,
"REASON": 3,
"VOLUME": 0.1,
"PRICE_OPEN": 1.17874,
"SL": 1.095,
"TP": 1.205,
"PRICE_CURRENT": 1.17858,
"SWAP": 0,
"PROFIT": -1.6,
"SYMBOL": "EURUSD.s",
"COMMENT": "Buy market order",
"EXTERNAL_ID": null,
"CHANGE": 0
}
],
"PENDING": [],
"ERROR_ID": 0,
"ERROR_DESCRIPTION": "The operation completed successfully"
}