Config file

This configuration file is used by FXTR v2 and DealsHistory.

It is important to point the path to that config file in FXTR v2 and in DealsHistory.

In the module FXTR v2 you should specify the path to that file in FXTR v2 in variable ACC_TYPES.

In the module DealsHistory you should specify the path to that file in DealsHistory in variable CONFIG_PATH.

{
  "accounts": {
    "default-mt": {
      "fields": {
        "group_name": {
          "description": "",
          "optional": false
        },
        "investor_pass": {
          "description": "password for MT to login as an investor",
          "optional": true
        },
        "leverage": {
          "choices": [
            50,
            100
          ],
          "description": "trading leverage",
          "optional": true
        },
        "name": {
          "description": "",
          "optional": true
        },
        "server_code": {
          "description": "",
          "optional": false
        },
        "trading_pass": {
          "description": "password for MT to login as a trader",
          "optional": true
        }
      },
      "private": {
        "balance_confirmation_url": "",
        "bonus_confirmation_url": ""
      },
      "public": {
        "groups": {
          "xxxx\\xxxxxxxx\\xxxxxxxxxxxxxxxx": ["mt_real1"]
        },
        "is_generated": false,
        "is_real": true
      }
    },
    "demo-mt": {
      "fields": {
        "group_name": {
          "description": "",
          "optional": false
        },
        "investor_pass": {
          "description": "password for MT to login as an investor",
          "optional": true
        },
        "leverage": {
          "choices": [
            50,
            100
          ],
          "description": "trading leverage",
          "optional": true
        },
        "name": {
          "description": "",
          "optional": true
        },
        "server_code": {
          "description": "",
          "optional": false
        },
        "trading_pass": {
          "description": "password for MT to login as a trader",
          "optional": true
        }
      },
      "private": {
        "balance_confirmation_url": "",
        "bonus_confirmation_url": ""
      },
      "public": {
        "groups": {
          "xxxx\\xxxxxxxx\\xxxxxxxxxxxxxxxx": [
            "mt_trial1"
          ]
        },
        "is_generated": false,
        "is_real": true
      }
    }
  },
  "servers": {
    "mt_real1": {
      "private": {
        "rest_url": "http://xxx.xxx.xxx.xxx:xxxx",
        "stream_url": "ws://xxx.xxx.xxx.xxx:xxxx/stream",
        "streaming_key": "-----BEGIN EC PRIVATE KEY-----\nMHcC...150kw==\n-----END EC PRIVATE KEY-----"
      },
      "public": {
        "connection_url": "xxx.xxx.xxx.xxx:xxxx",
        "description": "",
        "download_url": "https://rock-west.com/en/platforms-mt"
      }
    },
    "mt_trial1": {
      "private": {
        "rest_url": "http://xxx.xxx.xxx.xxx:xxxx",
        "stream_url": "ws://xxx.xxx.xxx.xxx:xxxx/stream",
        "streaming_key": "-----BEGIN EC PRIVATE KEY-----\nMHcC...150kw==\n-----END EC PRIVATE KEY-----"
      },
      "public": {
        "connection_url": "xxx.xxx.xxx.xxx:xxxx",
        "description": "",
        "download_url": "https://rock-west.com/en/platforms-mt"
      }
    }
  }
}

Description of parameters:

  • servers - list of service

    • key - unique server key, internal identification key

      • private - private information used to connect to the trading server

      • public - public information available to the client to work with this server

  • accounts - list of account types

    • key - unique account type, internal identification key

      • fields - fields required to create this type of account

        • field_name - name of the field unique within one type of account

          • description - field description

          • optional - shows if the field required or optional

          • choices - (enum/select) available values

      • private - private information used by the service (for example, the callback address to complete the operation)

      • public - public information available to the client for working with this type of account:

        • groups - Key - unique name of the group, value - array of keys of servers where this group is supported. The group is only used to create a user account. Later, the account can be transferred from one group to another.

        • is_generated - whether this type of account is generated (the system is responsible for creating an account, in which it is not possible to create an account by the user)

        • is_real - whether this type of account is real (trading on real accounts associated with client funds

Last updated