Request
/commands
Body
{
"account_id":12345,
"command":"open",
"type":"open",
"by":"ticket",
"symbol":"GBPUSD",
"open_price":1.222,
"lots":0.01
}
Response
{
"result": "success",
"status": 200,
"data": {
"id": 1967123,
"created_at": "2021-03-22T10:02:52.000000Z",
"updated_at": "2021-03-22T10:02:52.000000Z",
"account_id": 123456,
"group": "user",
"event": null,
"event_id": null,
"copier_id": null,
"lead_id": null,
"command": "open",
"status": "working",
"..": ".........."
}
}
Attributes
Field |
Required |
Accepted |
Description |
account_id |
yes |
integer |
Account ID |
command |
yes |
string |
A valid command (see below) |
type |
yes |
string |
Trade type |
symbol |
yes |
string |
Broker symbol name |
lots |
yes |
double |
The real address found in the srv file |
open_price |
yes |
double |
Open price for orders and preferred for market trades |
slippage |
yes |
double |
Acceptable variance from open price in pips |
stop_loss |
no |
double |
Stop loss value if required |
take_profit |
no |
double |
Take profit value if required |
magic |
no |
integer |
Unique number to identify the trade |
comment |
no |
string |
A string for the MT comments column |
command
Value |
Description |
open |
Open a new trade |