MT5: New Account (mt5_new_account)¶
This call creates new MT5 user, either demo or real money user.
Auth Scope(s): admin
-
mt5_new_account
(account_type: str, email: str, leverage: Union[int, float, Decimal], mainPassword: str, name: str, address: Optional[str] = None, city: Optional[str] = None, company: Optional[str] = None, country: Optional[str] = None, currency: Optional[str] = None, dry_run: Optional[int] = None, investPassword: Optional[str] = None, mt5_account_category: Optional[str] = None, mt5_account_type: Optional[str] = None, phone: Optional[str] = None, phonePassword: Optional[str] = None, server: Optional[str] = None, state: Optional[str] = None, zipCode: Optional[str] = None, passthrough: Optional[Any] = None, req_id: Optional[int] = None) → int¶ Parameters: - account_type (str) – Account type. If set to ‘financial’, setting ‘mt5_account_type’ is also required.
- email (str) – Email address
- leverage (Union[int, float, Decimal]) – Client leverage (from 1 to 1000).
- mainPassword (str) – The master password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user’s email address). This field is required.
- name (str) – Client’s name. The maximum length here is 101 characters.
- address (Optional[str]) – [Optional] The address of the user. The maximum length of this address field is 128 characters.
- city (Optional[str]) – [Optional] User’s city of residence.
- company (Optional[str]) – [Optional] Name of the client’s company. The maximum length of the company name is 64 characters.
- country (Optional[str]) – [Optional] 2-letter country code (value received from residence_list call).
- currency (Optional[str]) – [Optional] MT5 account currency, the default value will be the qualified account currency.
- dry_run (Optional[int]) – [Optional] If set to 1, only validation is performed.
- investPassword (Optional[str]) – [Optional] The investor password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user’s email address).
- mt5_account_category (Optional[str]) – [Optional] To choose whether account is conventional or not. Unavailable for financial_stp MT5_account_type
- mt5_account_type (Optional[str]) – [Optional] Financial: Variable spreads, High leverage. Financial STP: Variable spreads, Medium Leverage, more products. If ‘account_type’ set to ‘financial’, setting ‘mt5_account_type’ is also required.
- phone (Optional[str]) – [Optional] User’s phone number.
- phonePassword (Optional[str]) – [Optional] The user’s phone password.
- server (Optional[str]) – [Optional] Trade server.
- state (Optional[str]) – [Optional] User’s state (region) of residence.
- zipCode (Optional[str]) – [Optional] User’s zip code.
- passthrough (Optional[Any]) – [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field.
- req_id (Optional[int]) – [Optional] Used to map request to response.
Returns: req_id
Return type: int
Example¶
binary.api.mt5_new_account(
account_type='demo'
address='Dummy address'
city='Valletta'
company='Deriv Limited'
country='mt'
email='test@mailinator.com'
investPassword='Anoth3r_p4ssword'
leverage=100
mainPassword='C0rrect_p4ssword'
mt5_account_category='conventional'
mt5_account_type='financial'
name='Peter Pan'
phone='+6123456789'
phonePassword='AbcDv1234'
state='Valleta'
zipCode='VLT 1117'
)
See also