Struct Mt5NewAccountRequest

Source
pub struct Mt5NewAccountRequest {
Show 27 fields pub account_type: AccountType, pub address: Option<String>, pub city: Option<String>, pub company: Option<String>, pub country: Option<String>, pub currency: Option<String>, pub dry_run: Option<DryRun>, pub email: String, pub invest_password: Option<String>, pub leverage: f64, pub loginid: Option<String>, pub main_password: String, pub migrate: Option<bool>, pub mt5_account_category: Option<Mt5AccountCategory>, pub mt5_account_type: Option<Mt5AccountType>, pub mt5_new_account: Value, pub name: String, pub passthrough: Option<Value>, pub phone: Option<Value>, pub phone_password: Option<String>, pub product: Option<Product>, pub req_id: Option<i64>, pub server: Option<Value>, pub state: Option<String>, pub sub_account_category: Option<SubAccountCategory>, pub sub_account_type: Option<SubAccountType>, pub zip_code: Option<String>,
}
Expand description

This call creates new MT5 user, either demo or real money user.

Fields§

§account_type: AccountType

Account type. If set to ‘financial’, setting ‘mt5_account_type’ is also required.\n

§address: Option<String>

[Optional] The address of the user. The maximum length of this address field is 128 characters.\n

§city: Option<String>

[Optional] User’s city of residence.\n

§company: Option<String>

[Optional] Name of the client’s company. The maximum length of the company name is 64 characters.\n

§country: Option<String>

[Optional] 2-letter country code (value received from residence_list call).\n

§currency: Option<String>

[Optional] MT5 account currency, the default value will be the qualified account currency.\n

§dry_run: Option<DryRun>

[Optional] If set to 1, only validation is performed.\n

§email: String

Email address\n

§invest_password: Option<String>

[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).\n

§leverage: f64

Client leverage (from 1 to 1000).\n

§loginid: Option<String>

[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n

§main_password: String

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.\n

§migrate: Option<bool>

[Optional] Indicates whether the user would like to migrate his account to other jurisdiction.\n

§mt5_account_category: Option<Mt5AccountCategory>

[Optional] To choose whether account is conventional or swap_free. Unavailable for financial_stp MT5_account_type\n

§mt5_account_type: Option<Mt5AccountType>

[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.\n

§mt5_new_account: Value

Field ‘mt5_new_account’ mapped to Value due to complexity/potential issues.\n

§name: String

Client’s name. The maximum length here is 101 characters.\n

§passthrough: Option<Value>

[Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field.\n

§phone: Option<Value>

[Optional] User’s phone number.\n

§phone_password: Option<String>

[Optional] The user’s phone password.\n

§product: Option<Product>

Product name that Deriv offer\n

§req_id: Option<i64>

[Optional] Used to map request to response.\n

§server: Option<Value>

[Optional] Trade server.\n

§state: Option<String>

[Optional] User’s state (region) of residence.\n

§sub_account_category: Option<SubAccountCategory>

[Optional] Indicate the additional risk management for each account\n

§sub_account_type: Option<SubAccountType>

[Optional] Indicate the different offerings for mt5 account\n

§zip_code: Option<String>

[Optional] User’s zip code.\n

Trait Implementations§

Source§

impl Clone for Mt5NewAccountRequest

Source§

fn clone(&self) -> Mt5NewAccountRequest

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Mt5NewAccountRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Mt5NewAccountRequest

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Mt5NewAccountRequest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,