ORDER_CLOSE

Description

Partially or fully close an order using the ticket number. Also closes stop or limit 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_CLOSE","TICKET": 51562725}

Reply

{
"MSG": "ORDER_CLOSE",
"TICKET": 51562725,
"TYPE": "FULLY_CLOSED",
"RETCODE": 10009,
"DEAL": 48402524,
"ORDER": 51564735,
"VOLUME": 0.1,
"PRICE": 1.17904,
"BID": 0,
"ASK": 0,
"ERROR_ID": 0,
"ERROR_DESCRIPTION": "The operation completed successfully"
}