Skip to content

Create account

About

Starts cloud API server for a MetaTrader account using specified provisioning profile. It takes some time to launch the terminal and connect the terminal to the broker, you can use the connectionStatus field to monitor the current status of the terminal. For more details see MetatraderAccount.

POST /users/current/accounts

For more information see swagger documentation

Headers

Name Type Required Description
auth-token string Yes Authorization token. See Authentication and authorization

Body

Name Type Required Description
login string Yes MetaTrader account number. Only digits are allowed
password string Yes MetaTrader account password. The password can be either investor password for read-only access or master password to enable trading features. Required for cloud account
name string Yes Human-readable account name
server string Yes MetaTrader server name to connect to
provisioningProfileId string Yes Id of the provisioning profile that was used as the basis for creating this account. Required for cloud account
magic number Yes Magic value the trades should be performed using. When manualTrades field is set to true, magic value must be 0
application string Yes application to connect MetaTrader terminal to. Can be one of MetaApi or CopyFactory, enum: MetaApi, CopyFactory
type string Account type. Executing accounts as cloud-g2 is faster and cheaper. Cloud and cloud-g2 are aliases, enum: cloud, cloud-g1, cloud-g2, default: cloud
manualTrades boolean Flag indicating if trades placed on this account are manual trades. Default is false
slippage number Default trade slippage in points. Should be greater or equal to zero. If not specified, system internal setting will be used which we believe is reasonable for most cases
quoteStreamingIntervalInSeconds number Quote streaming interval in seconds. Set to 0 in order to receive quotes on each tick. Default value is 2.5 seconds. Intervals less than 2.5 seconds are supported only for G2.
extensions Array<Extension> API extensions
metadata object Extra information which can be stored together with your account. Total length of this field after serializing it to JSON is limited to 1024 characters
reliability string Used to increase the reliability of the account. Allowed values are regular and high. Default is regular. 'high' is a recommended value for production environment

Response

  • 201 - New MetaTrader account created successfully. Schema:
Name Type Required Description
id string Yes Created MetaTrader account id
  • 400 - Validation failed. Response schema: Error
  • 401 - Authorization failed. Response schema: Error
  • 404 - Provisioning profile with specified id not found. Response schema: Error

Examples

Example request:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'auth-token: token' -d '{
    "login": "123456",
    "password": "password",
    "name": "testAccount",
    "server": "ICMarketsSC-Demo",
    "provisioningProfileId": "f9ce1f12-e720-4b9a-9477-c2d4cb25f076",
    "magic": 123456,
    "application": "MetaApi"
}' 'https://mt-provisioning-api-v1.agiliumtrade.agiliumtrade.ai/users/current/accounts'

Example response:

{
  "id": "1eda642a-a9a3-457c-99af-3bc5e8d5c4c9"
}