pub struct ProtoOaSymbol {Show 40 fields
pub symbol_id: i64,
pub digits: i32,
pub pip_position: i32,
pub enable_short_selling: Option<bool>,
pub guaranteed_stop_loss: Option<bool>,
pub swap_rollover3_days: Option<i32>,
pub swap_long: Option<f64>,
pub swap_short: Option<f64>,
pub max_volume: Option<i64>,
pub min_volume: Option<i64>,
pub step_volume: Option<i64>,
pub max_exposure: Option<u64>,
pub schedule: Vec<ProtoOaInterval>,
pub commission: Option<i64>,
pub commission_type: Option<i32>,
pub sl_distance: Option<u32>,
pub tp_distance: Option<u32>,
pub gsl_distance: Option<u32>,
pub gsl_charge: Option<i64>,
pub distance_set_in: Option<i32>,
pub min_commission: Option<i64>,
pub min_commission_type: Option<i32>,
pub min_commission_asset: Option<String>,
pub rollover_commission: Option<i64>,
pub skip_rollover_days: Option<i32>,
pub schedule_time_zone: Option<String>,
pub trading_mode: Option<i32>,
pub rollover_commission3_days: Option<i32>,
pub swap_calculation_type: Option<i32>,
pub lot_size: Option<i64>,
pub precise_trading_commission_rate: Option<i64>,
pub precise_min_commission: Option<i64>,
pub holiday: Vec<ProtoOaHoliday>,
pub pnl_conversion_fee_rate: Option<i32>,
pub leverage_id: Option<i64>,
pub swap_period: Option<i32>,
pub swap_time: Option<i32>,
pub skip_swap_periods: Option<i32>,
pub charge_swap_at_weekends: Option<bool>,
pub measurement_units: Option<String>,
}Expand description
- Trading symbol entity.
Fields§
§symbol_id: i64The unique identifier of the symbol in specific server environment within cTrader platform. Different servers have different IDs.
digits: i32Number of price digits to be displayed.
pip_position: i32Pip position on digits.
enable_short_selling: Option<bool>If TRUE then the short selling with the symbol is enabled.
guaranteed_stop_loss: Option<bool>If TRUE then setting of guaranteedStopLoss is available for limited risk accounts.
swap_rollover3_days: Option<i32>Day of the week when SWAP charge amount will be tripled. Doesn’t impact Rollover Commission.
swap_long: Option<f64>SWAP charge for long positions.
swap_short: Option<f64>SWAP charge for short positions.
max_volume: Option<i64>Maximum allowed volume in cents for an order with a symbol.
min_volume: Option<i64>Minimum allowed volume in cents for an order with a symbol.
step_volume: Option<i64>Step of the volume in cents for an order.
max_exposure: Option<u64>Value of max exposure per symbol, per account. Blocks execution if breached.
schedule: Vec<ProtoOaInterval>Symbol trading interval, specified in seconds starting from SUNDAY 00:00 in specified time zone.
commission: Option<i64>Commission base amount. Total commission depends on commissionType. Use preciseTradingCommissionRate.
commission_type: Option<i32>Commission type. See ProtoOACommissionType for details.
sl_distance: Option<u32>Minimum allowed distance between stop loss and current market price.
tp_distance: Option<u32>Minimum allowed distance between take profit and current market price.
gsl_distance: Option<u32>Minimum allowed distance between guaranteed stop loss and current market price.
gsl_charge: Option<i64>Guaranteed stop loss fee.
distance_set_in: Option<i32>Unit of distance measure for slDistance, tpDistance, gslDistance.
min_commission: Option<i64>Minimum commission amount per trade. Use preciseMinCommission.
min_commission_type: Option<i32>Minimum commission Type. See ProtoOAMinCommissionType for details.
min_commission_asset: Option<String>Currency for minimum commission. (USD or quote currency).
rollover_commission: Option<i64>Administrative Fee, charged instead of Swaps if the Account is marked as a “Shariah Compliant (Swap Free)”. The Administrative Fee is charged daily as USD per current open volume of Position in lots. The Account charged in the Deposit currency.
skip_rollover_days: Option<i32>Initial period before the first rolloverCommission will be charged on the account.
schedule_time_zone: Option<String>Time zone for the symbol trading intervals.
trading_mode: Option<i32>Rules for trading with the symbol. See ProtoOATradingMode for details.
rollover_commission3_days: Option<i32>Day of the week (in UTC) when Administrative Fee charge amount will be tripled. Applied only if RolloverChargePeriod = 0 or 1.
swap_calculation_type: Option<i32>Specifies type of SWAP computation as PIPS (0) or PERCENTAGE (1, annual, in percent).
lot_size: Option<i64>Lot size of the Symbol (in cents).
precise_trading_commission_rate: Option<i64>Commission base amount. Total commission depends on commissionType: for non-percentage types it is multiplied by 10^8, for percentage of value commission type it is multiplied by 10^5.
precise_min_commission: Option<i64>Minimum commission amount per trade multiplied by 10^8.
holiday: Vec<ProtoOaHoliday>List of holidays for this symbol specified by broker.
pnl_conversion_fee_rate: Option<i32>Percentage (1 = 0.01%) of the realized Gross Profit, which will be paid by the Trader for any trade if the Quote Asset of the traded Symbol is not matched with the Deposit Asset.
leverage_id: Option<i64>The unique identifier of dynamic leverage entity. https://help.ctrader.com/ctrader/trading/dynamic-leverage
swap_period: Option<i32>Period of charging swaps in hours. 24 means swaps will be charged 1 time per day, 12 - every 12 hours, 8 - every 8 hours, etc.
swap_time: Option<i32>Time in minutes from 00:00 (UTC) when intraday swaps are charged for the first time.
skip_swap_periods: Option<i32>Count of swapPeriods before the first SWAP charge.
charge_swap_at_weekends: Option<bool>If enabled, SWAP will be charged for all days of the week, including Saturday and Sunday.
measurement_units: Option<String>Specifies the units in which the base Asset of the Symbol is denominated.
Implementations§
Source§impl ProtoOaSymbol
impl ProtoOaSymbol
Sourcepub fn enable_short_selling(&self) -> bool
pub fn enable_short_selling(&self) -> bool
Returns the value of enable_short_selling, or the default value if enable_short_selling is unset.
Sourcepub fn guaranteed_stop_loss(&self) -> bool
pub fn guaranteed_stop_loss(&self) -> bool
Returns the value of guaranteed_stop_loss, or the default value if guaranteed_stop_loss is unset.
Sourcepub fn swap_rollover3_days(&self) -> ProtoOaDayOfWeek
pub fn swap_rollover3_days(&self) -> ProtoOaDayOfWeek
Returns the enum value of swap_rollover3_days, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_swap_rollover3_days(&mut self, value: ProtoOaDayOfWeek)
pub fn set_swap_rollover3_days(&mut self, value: ProtoOaDayOfWeek)
Sets swap_rollover3_days to the provided enum value.
Sourcepub fn swap_long(&self) -> f64
pub fn swap_long(&self) -> f64
Returns the value of swap_long, or the default value if swap_long is unset.
Sourcepub fn swap_short(&self) -> f64
pub fn swap_short(&self) -> f64
Returns the value of swap_short, or the default value if swap_short is unset.
Sourcepub fn max_volume(&self) -> i64
pub fn max_volume(&self) -> i64
Returns the value of max_volume, or the default value if max_volume is unset.
Sourcepub fn min_volume(&self) -> i64
pub fn min_volume(&self) -> i64
Returns the value of min_volume, or the default value if min_volume is unset.
Sourcepub fn step_volume(&self) -> i64
pub fn step_volume(&self) -> i64
Returns the value of step_volume, or the default value if step_volume is unset.
Sourcepub fn max_exposure(&self) -> u64
pub fn max_exposure(&self) -> u64
Returns the value of max_exposure, or the default value if max_exposure is unset.
Sourcepub fn commission(&self) -> i64
pub fn commission(&self) -> i64
Returns the value of commission, or the default value if commission is unset.
Sourcepub fn commission_type(&self) -> ProtoOaCommissionType
pub fn commission_type(&self) -> ProtoOaCommissionType
Returns the enum value of commission_type, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_commission_type(&mut self, value: ProtoOaCommissionType)
pub fn set_commission_type(&mut self, value: ProtoOaCommissionType)
Sets commission_type to the provided enum value.
Sourcepub fn sl_distance(&self) -> u32
pub fn sl_distance(&self) -> u32
Returns the value of sl_distance, or the default value if sl_distance is unset.
Sourcepub fn tp_distance(&self) -> u32
pub fn tp_distance(&self) -> u32
Returns the value of tp_distance, or the default value if tp_distance is unset.
Sourcepub fn gsl_distance(&self) -> u32
pub fn gsl_distance(&self) -> u32
Returns the value of gsl_distance, or the default value if gsl_distance is unset.
Sourcepub fn gsl_charge(&self) -> i64
pub fn gsl_charge(&self) -> i64
Returns the value of gsl_charge, or the default value if gsl_charge is unset.
Sourcepub fn distance_set_in(&self) -> ProtoOaSymbolDistanceType
pub fn distance_set_in(&self) -> ProtoOaSymbolDistanceType
Returns the enum value of distance_set_in, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_distance_set_in(&mut self, value: ProtoOaSymbolDistanceType)
pub fn set_distance_set_in(&mut self, value: ProtoOaSymbolDistanceType)
Sets distance_set_in to the provided enum value.
Sourcepub fn min_commission(&self) -> i64
pub fn min_commission(&self) -> i64
Returns the value of min_commission, or the default value if min_commission is unset.
Sourcepub fn min_commission_type(&self) -> ProtoOaMinCommissionType
pub fn min_commission_type(&self) -> ProtoOaMinCommissionType
Returns the enum value of min_commission_type, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_min_commission_type(&mut self, value: ProtoOaMinCommissionType)
pub fn set_min_commission_type(&mut self, value: ProtoOaMinCommissionType)
Sets min_commission_type to the provided enum value.
Sourcepub fn min_commission_asset(&self) -> &str
pub fn min_commission_asset(&self) -> &str
Returns the value of min_commission_asset, or the default value if min_commission_asset is unset.
Sourcepub fn rollover_commission(&self) -> i64
pub fn rollover_commission(&self) -> i64
Returns the value of rollover_commission, or the default value if rollover_commission is unset.
Sourcepub fn skip_rollover_days(&self) -> i32
pub fn skip_rollover_days(&self) -> i32
Returns the value of skip_rollover_days, or the default value if skip_rollover_days is unset.
Sourcepub fn schedule_time_zone(&self) -> &str
pub fn schedule_time_zone(&self) -> &str
Returns the value of schedule_time_zone, or the default value if schedule_time_zone is unset.
Sourcepub fn trading_mode(&self) -> ProtoOaTradingMode
pub fn trading_mode(&self) -> ProtoOaTradingMode
Returns the enum value of trading_mode, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_trading_mode(&mut self, value: ProtoOaTradingMode)
pub fn set_trading_mode(&mut self, value: ProtoOaTradingMode)
Sets trading_mode to the provided enum value.
Sourcepub fn rollover_commission3_days(&self) -> ProtoOaDayOfWeek
pub fn rollover_commission3_days(&self) -> ProtoOaDayOfWeek
Returns the enum value of rollover_commission3_days, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_rollover_commission3_days(&mut self, value: ProtoOaDayOfWeek)
pub fn set_rollover_commission3_days(&mut self, value: ProtoOaDayOfWeek)
Sets rollover_commission3_days to the provided enum value.
Sourcepub fn swap_calculation_type(&self) -> ProtoOaSwapCalculationType
pub fn swap_calculation_type(&self) -> ProtoOaSwapCalculationType
Returns the enum value of swap_calculation_type, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_swap_calculation_type(&mut self, value: ProtoOaSwapCalculationType)
pub fn set_swap_calculation_type(&mut self, value: ProtoOaSwapCalculationType)
Sets swap_calculation_type to the provided enum value.
Sourcepub fn lot_size(&self) -> i64
pub fn lot_size(&self) -> i64
Returns the value of lot_size, or the default value if lot_size is unset.
Sourcepub fn precise_trading_commission_rate(&self) -> i64
pub fn precise_trading_commission_rate(&self) -> i64
Returns the value of precise_trading_commission_rate, or the default value if precise_trading_commission_rate is unset.
Sourcepub fn precise_min_commission(&self) -> i64
pub fn precise_min_commission(&self) -> i64
Returns the value of precise_min_commission, or the default value if precise_min_commission is unset.
Sourcepub fn pnl_conversion_fee_rate(&self) -> i32
pub fn pnl_conversion_fee_rate(&self) -> i32
Returns the value of pnl_conversion_fee_rate, or the default value if pnl_conversion_fee_rate is unset.
Sourcepub fn leverage_id(&self) -> i64
pub fn leverage_id(&self) -> i64
Returns the value of leverage_id, or the default value if leverage_id is unset.
Sourcepub fn swap_period(&self) -> i32
pub fn swap_period(&self) -> i32
Returns the value of swap_period, or the default value if swap_period is unset.
Sourcepub fn swap_time(&self) -> i32
pub fn swap_time(&self) -> i32
Returns the value of swap_time, or the default value if swap_time is unset.
Sourcepub fn skip_swap_periods(&self) -> i32
pub fn skip_swap_periods(&self) -> i32
Returns the value of skip_swap_periods, or the default value if skip_swap_periods is unset.
Sourcepub fn charge_swap_at_weekends(&self) -> bool
pub fn charge_swap_at_weekends(&self) -> bool
Returns the value of charge_swap_at_weekends, or the default value if charge_swap_at_weekends is unset.
Sourcepub fn measurement_units(&self) -> &str
pub fn measurement_units(&self) -> &str
Returns the value of measurement_units, or the default value if measurement_units is unset.
Trait Implementations§
Source§impl Clone for ProtoOaSymbol
impl Clone for ProtoOaSymbol
Source§fn clone(&self) -> ProtoOaSymbol
fn clone(&self) -> ProtoOaSymbol
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProtoOaSymbol
impl Debug for ProtoOaSymbol
Source§impl Default for ProtoOaSymbol
impl Default for ProtoOaSymbol
Source§impl<'de> Deserialize<'de> for ProtoOaSymbol
impl<'de> Deserialize<'de> for ProtoOaSymbol
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 Message for ProtoOaSymbol
impl Message for ProtoOaSymbol
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.