MetatraderAccount
About
Metatrader account model
Fields
Name | Type | Required | Description |
---|---|---|---|
_id | string | Yes | account id |
login | string | Yes | metaTrader account number. Only digits are allowed |
name | string | Yes | human-readable account name |
server | string | metaTrader server name to connect to | |
provisioningProfileId | string | id of the provisioning profile that was used as the basis for creating this account | |
magic | number | magic value the trades should be performed using | |
application | string | Yes | application to connect MetaTrader terminal to, enum: MetaApi , CopyFactory |
connectionStatus | string | Yes | connection status of the MetaTrader terminal to the application, enum: CONNECTED , DISCONNECTED , DISCONNECTED_FROM_BROKER |
state | string | Yes | current account state, enum: CREATED , DEPLOYING , DEPLOYED , UNDEPLOYING , UNDEPLOYED , DELETING |
type | string | Yes | Account type. Executing accounts as cloud-g2 is faster and cheaper. However MT5 support for G2 is still experimental. Cloud and cloud-g2 are aliases. self-hosted type means that you have to host the terminal yourself, enum: cloud , cloud-g1 , cloud-g1 , self-hosted , default: cloud |
accessToken | string | Yes | authorization access token to be used for accessing single account data. Intended to be used in browser API. |
manualTrades | boolean | Flag indicating if trades placed on this account are manual trades. Default is false. Supported for G2 only. | |
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 |
Example
{
"_id": "1eda642a-a9a3-457c-99af-3bc5e8d5c4c9",
"login": "login",
"name": "mt5a",
"server": "ICMarketsSC-Demo",
"provisioningProfileId": "f9ce1f12-e720-4b9a-9477-c2d4cb25f076",
"magic": 123456,
"application": "MetaApi",
"connectionStatus": "DISCONNECTED",
"state": "DEPLOYED",
"type": "cloud",
"manualTrades": true,
"quoteStreamingIntervalInSeconds": 2.5
}