Skip to content

MetatraderAccountReplica

About

Metatrader account replica model

Fields

Name Type Required Description
_id string Yes Account replica id
magic number Yes Magic value the trades should be performed using
connectionStatus string Yes Connection status of the MetaTrader terminal to the application, enum: CONNECTED, DISCONNECTED, DISCONNECTED_FROM_BROKER
state string Yes Current account replica state, enum: CREATED, DEPLOYING, DEPLOYED, DEPLOY_FAILED, UNDEPLOYING, UNDEPLOYED, UNDEPLOY_FAILED, DELETING, DELETE_FAILED, REDEPLOY_FAILED
region string Yes Region id to deploy account replica at. One of returned by the /users/current/regions endpoint
quoteStreamingIntervalInSeconds number Yes 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
symbol string Any symbol provided by broker (required for G1 only)
tags Array Yes User-defined account replica tags
metadata object Extra information which can be stored together with your account replica. Total length of this field after serializing it to JSON is limited to 1024 characters
reliability string Yes Used to increase the reliability of the account replica. Allowed values are regular and high. High is a recommended value for production environment. Default is high
resourceSlots number Yes Number of resource slots to allocate to account replica. Allocating extra resource slots results in better account performance under load which is useful for some applications. E.g. if you have many accounts copying the same strategy via CooyFactory API, then you can increase resourceSlots to get a lower trade copying latency. Please note that allocating extra resource slots is a paid option. Default is 1
copyFactoryResourceSlots number Yes Number of CopyFactory 2 resource slots to allocate to account replica. Allocating extra resource slots results in lower trade copying latency. Please note that allocating extra resource slots is a paid option. Please also note that CopyFactory 2 uses redundant infrastructure so that each CopyFactory resource slot is billed as 2 standard resource slots. You will be billed for CopyFactory 2 resource slots only if you have added your account to CopyFactory 2 by specifying copyFactoryRoles field. Default is 1
createdAt datetime Yes Time the account replica was created at, in ISO format
primaryAccount MetatraderAccount Yes Primary MetaTrader account. Only replicas can have primary account

Example

{
  "_id": "861ceafd-a58e-2fb9-a9bb-c9dd449f3bb4",
  "magic": 123456,
  "connectionStatus": "DISCONNECTED",
  "state": "DEPLOYED",
  "region": "vint-hill",
  "quoteStreamingIntervalInSeconds": 2.5,
  "tags": [],
  "reliability": "high",
  "resourceSlots": 1,
  "copyFactoryResourceSlots": 1,
  "createdAt": "2022-11-03T15:00:29.650Z",
  "primaryAccount": {
    "_id": "1eda642a-a9a3-457c-99af-3bc5e8d5c4c9",
    "login": "50194988",
    "name": "mt5a",
    "server": "ICMarketsSC-Demo",
    "magic": 123456,
    "connectionStatus": "DISCONNECTED",
    "state": "DEPLOYED",
    "type": "cloud-g2",
    "accessToken": "VreIBlCEmqngArxSIZKBcuoC7tA0RXsOh4FCiwFaQ5dzo4v8HfWJFP2Opr1MSxC3",
    "region": "vint-hill",
    "manualTrades": true,
    "quoteStreamingIntervalInSeconds": 2.5,
    "tags": [],
    "reliability": "high",
    "baseCurrency": "USD",
    "copyFactoryRoles": ["PROVIDER"],
    "resourceSlots": 1,
    "copyFactoryResourceSlots": 4,
    "version": 4,
    "hash": 18093,
    "primaryReplica": true,
    "userId": "7b17e36a88502fd2faae5dd9d2166873",
    "accountReplicas": [],
    "metastatsHourlyTarificationEnabled": false,
    "riskManagementApiEnabled": false,
    "createdAt": "2022-12-11T09:09:27.454Z" 
  }
}

Usages