Create open command .

POST

Request

/command

Body

{
    "account_id": 43809,
    "command": "open",
    "type": "sell",
    "symbol": "EURUSD",
    "open_price": 1.08920,
    "lots": 0.01,
    "slippage": 500,
    "stop_loss": 1.1,
    "take_profit": 1,
    "magic": 2,
    "comment": "test"
}

Response

{
    "result": "success",
    "status": 200,
    "code": "SUCCESS",
    "message": "Success",
    "data": {
        "command": {
            "id": 37298726,
            "created_at": "2020-04-16 13:38:09",
            "updated_at": "2020-04-16 13:38:09",
            "reason": "user",
            "account_id": 43809,
            "command": "open",
            "status": "working",
            "priority": 1,
            "result": null,
            "mt_error": null,
            "symbol": "EURUSD",
            "open_price": 1.0892,
            "lots": 0.01,
            "type": "sell",
            "stop_loss": "1.1",
            "take_profit": "1",
            "comment": "test",
            "magic": 2
        }
    }
}

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

Stay in the loop..

Sign up to our newsletter to keep up-to-date.