Skip to content

Updated account#

About#

Updated account

Fields#

Name Type Required Description
name string Yes account human-readable name
connectionId string Yes id of the MetaApi account to copy trades to
reservedMarginFraction number optional fraction of reserved margin to reduce a risk of margin call. Default is to reserve no margin. We recommend using maxLeverage setting instead. Specified as a fraction of balance thus the value is usually greater than 1
phoneNumbers Array<string> optional phone numbers to send sms notifications to. Leave empty to receive no sms notifications
minTradeAmount number optional value of minimal trade size allowed, expressed in amount of account currency. Can be useful if your broker charges a fixed fee per transaction so that you can skip small trades with high broker commission rates. Default is 100
closeOnly string optional setting wich instructs the application not to open new positions. by-symbol means that it is still allowed to open new positions with a symbol equal to the symbol of an existing strategy position (can be used to gracefuly exit strategies trading in netting mode or placing a series of related trades per symbol) = [by-position, by-symbol]
stopOutRisk StrategyStopOut optional stop out setting. All trading will be terminated and positions closed once equity drawdown reaches this value
riskLimits Array<StrategyR...> optional account risk limits. You can configure trading to be stopped once total drawdown generated during specific period is exceeded. Can be specified either for balance or equity drawdown
maxLeverage number optional setting indicating maxumum leverage allowed when opening a new positions. Any trade which results in a higher leverage will be discarded
subscriptions Array<StrategyS...> strategy subscription

Example#

{
  "name": "Demo account",
  "connectionId": "105646d8-8c97-4d4d-9b74-413bd66cd4ed",
  "reservedMarginFraction": 1.5,
  "minTradeAmount": 20,
  "closeOnly": "by-position",
  "stopOutRisk": {
    "value": 0.4,
    "startTime": "2020-08-24T00:00:00.000Z"
  },
  "riskLimits": [
    {
      "type": "daily",
      "applyTo": "balance",
      "maxRisk": 0.05,
      "closePositions": true,
      "startTime": "2020-08-24T00:00:00.000Z"
    }
  ],
  "maxLeverage": 50,
  "subscriptions": [
    {
      "strategyId": "SMKn",
      "multiplier": 1,
      "skipPendingOrders": true,
      "closeOnly": "by-strategy",
      "maxTradeRisk": 0.4,
      "reverse": true,
      "reduceCorrelations": "by-strategy",
      "stopOutRisk": {
        "value": 0.01,
        "startTime": "2020-08-24T00:00:00.000Z"
      },
      "symbolFilter": {
        "included": [
          "EURUSD"
        ],
        "excluded": [
          "EURUSD.m"
        ]
      },
      "newsFilter": {
        "calendarNewsFilter": {
          "priorities": [
            "election"
          ],
          "closePositionTimeGapInMinutes": 10,
          "openPositionPrecedingTimeGapInMinutes": 20,
          "openPositionFollowingTimeGapInMinutes": 20
        }
      },
      "riskLimits": [
        {
          "type": "daily",
          "applyTo": "balance",
          "maxRisk": 0.4,
          "closePositions": true,
          "startTime": "2020-08-24T00:00:00.000Z"
        }
      ],
      "maxStopLoss": {
        "value": 150,
        "units": "pips"
      },
      "maxLeverage": 50,
      "symbolMapping": [
        {
          "to": "EURUSD",
          "from": "EURUSD.m"
        }
      ],
      "tradeSizeScalingMode": "none"
    }
  ]
}

Usages#