Skip to main content

ProtoOaSymbol

Struct ProtoOaSymbol 

Source
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: i64

The unique identifier of the symbol in specific server environment within cTrader platform. Different servers have different IDs.

§digits: i32

Number of price digits to be displayed.

§pip_position: i32

Pip 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>
👎Deprecated

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>
👎Deprecated

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

Source

pub fn enable_short_selling(&self) -> bool

Returns the value of enable_short_selling, or the default value if enable_short_selling is unset.

Source

pub fn guaranteed_stop_loss(&self) -> bool

Returns the value of guaranteed_stop_loss, or the default value if guaranteed_stop_loss is unset.

Source

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.

Source

pub fn set_swap_rollover3_days(&mut self, value: ProtoOaDayOfWeek)

Sets swap_rollover3_days to the provided enum value.

Source

pub fn swap_long(&self) -> f64

Returns the value of swap_long, or the default value if swap_long is unset.

Source

pub fn swap_short(&self) -> f64

Returns the value of swap_short, or the default value if swap_short is unset.

Source

pub fn max_volume(&self) -> i64

Returns the value of max_volume, or the default value if max_volume is unset.

Source

pub fn min_volume(&self) -> i64

Returns the value of min_volume, or the default value if min_volume is unset.

Source

pub fn step_volume(&self) -> i64

Returns the value of step_volume, or the default value if step_volume is unset.

Source

pub fn max_exposure(&self) -> u64

Returns the value of max_exposure, or the default value if max_exposure is unset.

Source

pub fn commission(&self) -> i64

Returns the value of commission, or the default value if commission is unset.

Source

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.

Source

pub fn set_commission_type(&mut self, value: ProtoOaCommissionType)

Sets commission_type to the provided enum value.

Source

pub fn sl_distance(&self) -> u32

Returns the value of sl_distance, or the default value if sl_distance is unset.

Source

pub fn tp_distance(&self) -> u32

Returns the value of tp_distance, or the default value if tp_distance is unset.

Source

pub fn gsl_distance(&self) -> u32

Returns the value of gsl_distance, or the default value if gsl_distance is unset.

Source

pub fn gsl_charge(&self) -> i64

Returns the value of gsl_charge, or the default value if gsl_charge is unset.

Source

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.

Source

pub fn set_distance_set_in(&mut self, value: ProtoOaSymbolDistanceType)

Sets distance_set_in to the provided enum value.

Source

pub fn min_commission(&self) -> i64

Returns the value of min_commission, or the default value if min_commission is unset.

Source

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.

Source

pub fn set_min_commission_type(&mut self, value: ProtoOaMinCommissionType)

Sets min_commission_type to the provided enum value.

Source

pub fn min_commission_asset(&self) -> &str

Returns the value of min_commission_asset, or the default value if min_commission_asset is unset.

Source

pub fn rollover_commission(&self) -> i64

Returns the value of rollover_commission, or the default value if rollover_commission is unset.

Source

pub fn skip_rollover_days(&self) -> i32

Returns the value of skip_rollover_days, or the default value if skip_rollover_days is unset.

Source

pub fn schedule_time_zone(&self) -> &str

Returns the value of schedule_time_zone, or the default value if schedule_time_zone is unset.

Source

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.

Source

pub fn set_trading_mode(&mut self, value: ProtoOaTradingMode)

Sets trading_mode to the provided enum value.

Source

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.

Source

pub fn set_rollover_commission3_days(&mut self, value: ProtoOaDayOfWeek)

Sets rollover_commission3_days to the provided enum value.

Source

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.

Source

pub fn set_swap_calculation_type(&mut self, value: ProtoOaSwapCalculationType)

Sets swap_calculation_type to the provided enum value.

Source

pub fn lot_size(&self) -> i64

Returns the value of lot_size, or the default value if lot_size is unset.

Source

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.

Source

pub fn precise_min_commission(&self) -> i64

Returns the value of precise_min_commission, or the default value if precise_min_commission is unset.

Source

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.

Source

pub fn leverage_id(&self) -> i64

Returns the value of leverage_id, or the default value if leverage_id is unset.

Source

pub fn swap_period(&self) -> i32

Returns the value of swap_period, or the default value if swap_period is unset.

Source

pub fn swap_time(&self) -> i32

Returns the value of swap_time, or the default value if swap_time is unset.

Source

pub fn skip_swap_periods(&self) -> i32

Returns the value of skip_swap_periods, or the default value if skip_swap_periods is unset.

Source

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.

Source

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

Source§

fn clone(&self) -> ProtoOaSymbol

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 ProtoOaSymbol

Source§

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

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

impl Default for ProtoOaSymbol

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ProtoOaSymbol

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 Message for ProtoOaSymbol

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for ProtoOaSymbol

Source§

fn eq(&self, other: &ProtoOaSymbol) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ProtoOaSymbol

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
Source§

impl StructuralPartialEq for ProtoOaSymbol

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

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