Create account allows you to add an MT4/5 trading account to the platform. To create an account you must have an MT4/5 trading account already created with a broker. You require the version of Metatrader the account is on, the account number, the account password and the broker server it is hosted on.
/accounts
{
"account_name": "Demo",
"mt_version": 4,
"account_number": 123456,
"password":"password",
"broker_server_id": 1
}
{
"result": "success",
"status": 200,
"data": {
"id": 90,
"created_at": "2021-03-18T15:26:19.000000Z",
"updated_at": "2021-03-18T15:26:19.000000Z",
"mt_version": 4,
"account_name": "Demo",
"account_number": 123456,
"password": "password",
"broker_server_id": 1,
"status": "allocating",
"login_response": login_success
}
}
Field | Required | Accepted | Description |
---|---|---|---|
mt_version | yes | 4 or 5 | MT version of account |
account_name | yes | string | A reference name |
account_number | yes | integer | MT account number |
password | yes | string | MT account password |
broker_server_id | yes | integer | Valid broker server ID |
When you add an account it can take up to 1 minute to know whether the connection was successful. To know the result of a connection you need to check the status field. We recommend you poll once every 10 seconds for the latest status. See below for more details on the login_response.
Value | Description |
---|---|
login_success | You have successfully logged in with the main password |
invalid_account | Your account details are incorrect |
no_connection | There is no connection to your account |
investor_mode | You have logged onto the account with the investor password, a slave account will not be able to copy |
no_info | Default response when no information is available |
Code | Status | Description |
---|---|---|
too_many_accounts | 422 | You are at the maximum amount of accounts for your subscription package |
Sign up to our newsletter to keep up-to-date.