pub struct ProtoOaTrader {Show 22 fields
pub ctid_trader_account_id: i64,
pub balance: i64,
pub balance_version: Option<i64>,
pub manager_bonus: Option<i64>,
pub ib_bonus: Option<i64>,
pub non_withdrawable_bonus: Option<i64>,
pub access_rights: Option<i32>,
pub deposit_asset_id: i64,
pub swap_free: Option<bool>,
pub leverage_in_cents: Option<u32>,
pub total_margin_calculation_type: Option<i32>,
pub max_leverage: Option<u32>,
pub french_risk: Option<bool>,
pub trader_login: Option<i64>,
pub account_type: Option<i32>,
pub broker_name: Option<String>,
pub registration_timestamp: Option<i64>,
pub is_limited_risk: Option<bool>,
pub limited_risk_margin_calculation_strategy: Option<i32>,
pub money_digits: Option<u32>,
pub fair_stop_out: Option<bool>,
pub stop_out_strategy: Option<i32>,
}Expand description
- Trading account entity.
Fields§
§ctid_trader_account_id: i64The unique Trader’s Account ID used to match the responses to the Trader’s Account.
balance: i64Current account balance.
balance_version: Option<i64>Balance version used to identify the final balance. Increments each time when the trader’s account balance is changed.
manager_bonus: Option<i64>Amount of broker’s bonus allocated to the account.
ib_bonus: Option<i64>Amount of introducing broker bonus allocated to the account.
non_withdrawable_bonus: Option<i64>Broker’s bonus that cannot be withdrew from the account as cash.
access_rights: Option<i32>Access rights that an owner has to the account in cTrader platform. See ProtoOAAccessRights for details.
deposit_asset_id: i64Deposit currency of the account.
swap_free: Option<bool>If TRUE then account is Shariah compliant.
leverage_in_cents: Option<u32>Account leverage (e.g. If leverage = 1:50 then value = 5000).
total_margin_calculation_type: Option<i32>Margin computation type for the account (MAX, SUM, NET).
max_leverage: Option<u32>Maximum allowed leverage for the account. Used as validation when a Trader can change leverage value.
french_risk: Option<bool>If TRUE then account is AMF compliant. Use isLimitedRisk and limitedRiskMarginCalculationStrategy.
trader_login: Option<i64>ID of the account that is unique per server (Broker).
account_type: Option<i32>Account type: HEDGED, NETTED, etc.
broker_name: Option<String>Some whitelabel assigned to trader by broker at the moment of account creation.
registration_timestamp: Option<i64>The Unix timestamp in milliseconds of the account registration. Should be used as minimal date in historical data requests.
is_limited_risk: Option<bool>If TRUE then account is compliant to use specific margin calculation strategy. Such accounts are require to have guaranteed stop loss on all positions.
limited_risk_margin_calculation_strategy: Option<i32>Special strategy used in margin calculations for this account (if account isLimitedRisk).
money_digits: Option<u32>Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects balance, managerBonus, ibBonus, nonWithdrawableBonus.
fair_stop_out: Option<bool>If TRUE - Position is fully closed on Stop Out, if FALSE - smart (partial closing) Stop Out is applied, if unspecified - Stop Out format is determined by Broker.
stop_out_strategy: Option<i32>The Stop Out strategy that is used for this Trader. The Trader can change the value in the cTrader UI if this option is not disabled by the Broker
Implementations§
Source§impl ProtoOaTrader
impl ProtoOaTrader
Sourcepub fn balance_version(&self) -> i64
pub fn balance_version(&self) -> i64
Returns the value of balance_version, or the default value if balance_version is unset.
Sourcepub fn manager_bonus(&self) -> i64
pub fn manager_bonus(&self) -> i64
Returns the value of manager_bonus, or the default value if manager_bonus is unset.
Sourcepub fn ib_bonus(&self) -> i64
pub fn ib_bonus(&self) -> i64
Returns the value of ib_bonus, or the default value if ib_bonus is unset.
Sourcepub fn non_withdrawable_bonus(&self) -> i64
pub fn non_withdrawable_bonus(&self) -> i64
Returns the value of non_withdrawable_bonus, or the default value if non_withdrawable_bonus is unset.
Sourcepub fn access_rights(&self) -> ProtoOaAccessRights
pub fn access_rights(&self) -> ProtoOaAccessRights
Returns the enum value of access_rights, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_access_rights(&mut self, value: ProtoOaAccessRights)
pub fn set_access_rights(&mut self, value: ProtoOaAccessRights)
Sets access_rights to the provided enum value.
Sourcepub fn swap_free(&self) -> bool
pub fn swap_free(&self) -> bool
Returns the value of swap_free, or the default value if swap_free is unset.
Sourcepub fn leverage_in_cents(&self) -> u32
pub fn leverage_in_cents(&self) -> u32
Returns the value of leverage_in_cents, or the default value if leverage_in_cents is unset.
Sourcepub fn total_margin_calculation_type(&self) -> ProtoOaTotalMarginCalculationType
pub fn total_margin_calculation_type(&self) -> ProtoOaTotalMarginCalculationType
Returns the enum value of total_margin_calculation_type, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_total_margin_calculation_type(
&mut self,
value: ProtoOaTotalMarginCalculationType,
)
pub fn set_total_margin_calculation_type( &mut self, value: ProtoOaTotalMarginCalculationType, )
Sets total_margin_calculation_type to the provided enum value.
Sourcepub fn max_leverage(&self) -> u32
pub fn max_leverage(&self) -> u32
Returns the value of max_leverage, or the default value if max_leverage is unset.
Sourcepub fn french_risk(&self) -> bool
pub fn french_risk(&self) -> bool
Returns the value of french_risk, or the default value if french_risk is unset.
Sourcepub fn trader_login(&self) -> i64
pub fn trader_login(&self) -> i64
Returns the value of trader_login, or the default value if trader_login is unset.
Sourcepub fn account_type(&self) -> ProtoOaAccountType
pub fn account_type(&self) -> ProtoOaAccountType
Returns the enum value of account_type, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_account_type(&mut self, value: ProtoOaAccountType)
pub fn set_account_type(&mut self, value: ProtoOaAccountType)
Sets account_type to the provided enum value.
Sourcepub fn broker_name(&self) -> &str
pub fn broker_name(&self) -> &str
Returns the value of broker_name, or the default value if broker_name is unset.
Sourcepub fn registration_timestamp(&self) -> i64
pub fn registration_timestamp(&self) -> i64
Returns the value of registration_timestamp, or the default value if registration_timestamp is unset.
Sourcepub fn is_limited_risk(&self) -> bool
pub fn is_limited_risk(&self) -> bool
Returns the value of is_limited_risk, or the default value if is_limited_risk is unset.
Sourcepub fn limited_risk_margin_calculation_strategy(
&self,
) -> ProtoOaLimitedRiskMarginCalculationStrategy
pub fn limited_risk_margin_calculation_strategy( &self, ) -> ProtoOaLimitedRiskMarginCalculationStrategy
Returns the enum value of limited_risk_margin_calculation_strategy, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_limited_risk_margin_calculation_strategy(
&mut self,
value: ProtoOaLimitedRiskMarginCalculationStrategy,
)
pub fn set_limited_risk_margin_calculation_strategy( &mut self, value: ProtoOaLimitedRiskMarginCalculationStrategy, )
Sets limited_risk_margin_calculation_strategy to the provided enum value.
Sourcepub fn money_digits(&self) -> u32
pub fn money_digits(&self) -> u32
Returns the value of money_digits, or the default value if money_digits is unset.
Sourcepub fn fair_stop_out(&self) -> bool
pub fn fair_stop_out(&self) -> bool
Returns the value of fair_stop_out, or the default value if fair_stop_out is unset.
Sourcepub fn stop_out_strategy(&self) -> ProtoOaStopOutStrategy
pub fn stop_out_strategy(&self) -> ProtoOaStopOutStrategy
Returns the enum value of stop_out_strategy, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_stop_out_strategy(&mut self, value: ProtoOaStopOutStrategy)
pub fn set_stop_out_strategy(&mut self, value: ProtoOaStopOutStrategy)
Sets stop_out_strategy to the provided enum value.
Trait Implementations§
Source§impl Clone for ProtoOaTrader
impl Clone for ProtoOaTrader
Source§fn clone(&self) -> ProtoOaTrader
fn clone(&self) -> ProtoOaTrader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProtoOaTrader
impl Debug for ProtoOaTrader
Source§impl Default for ProtoOaTrader
impl Default for ProtoOaTrader
Source§impl<'de> Deserialize<'de> for ProtoOaTrader
impl<'de> Deserialize<'de> for ProtoOaTrader
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for ProtoOaTrader
impl Hash for ProtoOaTrader
Source§impl Message for ProtoOaTrader
impl Message for ProtoOaTrader
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for ProtoOaTrader
impl PartialEq for ProtoOaTrader
Source§impl Serialize for ProtoOaTrader
impl Serialize for ProtoOaTrader
impl Eq for ProtoOaTrader
impl StructuralPartialEq for ProtoOaTrader
Auto Trait Implementations§
impl Freeze for ProtoOaTrader
impl RefUnwindSafe for ProtoOaTrader
impl Send for ProtoOaTrader
impl Sync for ProtoOaTrader
impl Unpin for ProtoOaTrader
impl UnwindSafe for ProtoOaTrader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.