pub struct SymbolRecord {Show 46 fields
pub ask: Decimal,
pub bid: Decimal,
pub category_name: String,
pub contract_size: i64,
pub currency: String,
pub currency_pair: bool,
pub currency_profit: String,
pub description: String,
pub expiration: Option<u64>,
pub group_name: String,
pub high: Decimal,
pub initial_margin: i64,
pub instant_max_volume: i64,
pub leverage: Decimal,
pub long_only: bool,
pub lot_max: Decimal,
pub lot_min: Decimal,
pub lot_step: Decimal,
pub low: Decimal,
pub margin_hedged: i64,
pub margin_hedged_strong: bool,
pub margin_maintenance: Option<i64>,
pub margin_mode: MarginMode,
pub percentage: Decimal,
pub pips_precision: i64,
pub precision: i64,
pub profit_mode: ProfitMode,
pub quote_id: QuoteId,
pub short_selling: bool,
pub spread_raw: Decimal,
pub spread_table: Decimal,
pub starting: Option<u64>,
pub step_rule_id: i64,
pub stops_level: i64,
pub swap_rollover_3days: i64,
pub swap_enable: bool,
pub swap_long: Decimal,
pub swap_short: Decimal,
pub swap_type: i64,
pub symbol: String,
pub tick_size: Option<Decimal>,
pub tick_value: Option<Decimal>,
pub time: u64,
pub time_string: String,
pub trailing_enabled: bool,
pub type_: i64,
}Expand description
Structure representing details of a financial symbol
Fields§
§ask: DecimalAsk price in base currency
bid: DecimalBid price in base currency
category_name: StringCategory name
contract_size: i64Size of 1 lot
currency: StringCurrency
currency_pair: boolIndicates whether the symbol represents a currency pair
currency_profit: StringThe currency of calculated profit
description: StringDescription
expiration: Option<u64>Null if not applicable
group_name: StringSymbol group name
high: DecimalThe highest price of the day in base currency
initial_margin: i64Initial margin for 1 lot order, used for profit/margin calculation
instant_max_volume: i64Maximum instant volume multiplied by 100 (in lots)
leverage: DecimalSymbol leverage
long_only: boolLong only
lot_max: DecimalMaximum size of trade
lot_min: DecimalMinimum size of trade
lot_step: DecimalA value of minimum step by which the size of trade can be changed (within lotMin - lotMax range)
low: DecimalThe lowest price of the day in base currency
margin_hedged: i64Used for profit calculation
margin_hedged_strong: boolFor margin calculation
margin_maintenance: Option<i64>For margin calculation, null if not applicable
margin_mode: MarginModeFor margin calculation
percentage: DecimalPercentage
pips_precision: i64Number of symbol’s pip decimal places
precision: i64Number of symbol’s price decimal places
profit_mode: ProfitModeFor profit calculation
quote_id: QuoteIdSource of price
short_selling: boolIndicates whether short selling is allowed on the instrument
spread_raw: DecimalThe difference between raw ask and bid prices
spread_table: DecimalSpread representation
starting: Option<u64>Null if not applicable
step_rule_id: i64Appropriate step rule ID from getStepRules command response
stops_level: i64Minimal distance (in pips) from the current price where the stopLoss/takeProfit can be set
swap_rollover_3days: i64Time when additional swap is accounted for weekend
swap_enable: boolIndicates whether swap value is added to position on end of day
swap_long: DecimalSwap value for long positions in pips
swap_short: DecimalSwap value for short positions in pips
swap_type: i64Type of swap calculated
symbol: StringSymbol name
tick_size: Option<Decimal>Smallest possible price change, used for profit/margin calculation, null if not applicable
tick_value: Option<Decimal>Value of smallest possible price change (in base currency), used for profit/margin calculation, null if not applicable
time: u64Ask & bid tick time
time_string: StringTime in String
trailing_enabled: boolIndicates whether trailing stop (offset) is applicable to the instrument.
type_: i64Instrument class number
Implementations§
Source§impl SymbolRecord
impl SymbolRecord
Sourcepub fn with_category_name(self, value: impl Into<String>) -> Self
pub fn with_category_name(self, value: impl Into<String>) -> Self
Sets the category_name field of this struct.
Sourcepub fn with_contract_size(self, value: impl Into<i64>) -> Self
pub fn with_contract_size(self, value: impl Into<i64>) -> Self
Sets the contract_size field of this struct.
Sourcepub fn with_currency(self, value: impl Into<String>) -> Self
pub fn with_currency(self, value: impl Into<String>) -> Self
Sets the currency field of this struct.
Sourcepub fn with_currency_pair(self, value: impl Into<bool>) -> Self
pub fn with_currency_pair(self, value: impl Into<bool>) -> Self
Sets the currency_pair field of this struct.
Sourcepub fn with_currency_profit(self, value: impl Into<String>) -> Self
pub fn with_currency_profit(self, value: impl Into<String>) -> Self
Sets the currency_profit field of this struct.
Sourcepub fn with_description(self, value: impl Into<String>) -> Self
pub fn with_description(self, value: impl Into<String>) -> Self
Sets the description field of this struct.
Sourcepub fn with_expiration(self, value: impl Into<u64>) -> Self
pub fn with_expiration(self, value: impl Into<u64>) -> Self
Sets the expiration field of this struct.
Sourcepub fn with_group_name(self, value: impl Into<String>) -> Self
pub fn with_group_name(self, value: impl Into<String>) -> Self
Sets the group_name field of this struct.
Sourcepub fn with_initial_margin(self, value: impl Into<i64>) -> Self
pub fn with_initial_margin(self, value: impl Into<i64>) -> Self
Sets the initial_margin field of this struct.
Sourcepub fn with_instant_max_volume(self, value: impl Into<i64>) -> Self
pub fn with_instant_max_volume(self, value: impl Into<i64>) -> Self
Sets the instant_max_volume field of this struct.
Sourcepub fn with_leverage(self, value: impl Into<Decimal>) -> Self
pub fn with_leverage(self, value: impl Into<Decimal>) -> Self
Sets the leverage field of this struct.
Sourcepub fn with_long_only(self, value: impl Into<bool>) -> Self
pub fn with_long_only(self, value: impl Into<bool>) -> Self
Sets the long_only field of this struct.
Sourcepub fn with_lot_max(self, value: impl Into<Decimal>) -> Self
pub fn with_lot_max(self, value: impl Into<Decimal>) -> Self
Sets the lot_max field of this struct.
Sourcepub fn with_lot_min(self, value: impl Into<Decimal>) -> Self
pub fn with_lot_min(self, value: impl Into<Decimal>) -> Self
Sets the lot_min field of this struct.
Sourcepub fn with_lot_step(self, value: impl Into<Decimal>) -> Self
pub fn with_lot_step(self, value: impl Into<Decimal>) -> Self
Sets the lot_step field of this struct.
Sourcepub fn with_margin_hedged(self, value: impl Into<i64>) -> Self
pub fn with_margin_hedged(self, value: impl Into<i64>) -> Self
Sets the margin_hedged field of this struct.
Sourcepub fn with_margin_hedged_strong(self, value: impl Into<bool>) -> Self
pub fn with_margin_hedged_strong(self, value: impl Into<bool>) -> Self
Sets the margin_hedged_strong field of this struct.
Sourcepub fn with_margin_maintenance(self, value: impl Into<i64>) -> Self
pub fn with_margin_maintenance(self, value: impl Into<i64>) -> Self
Sets the margin_maintenance field of this struct.
Sourcepub fn with_margin_mode(self, value: impl Into<MarginMode>) -> Self
pub fn with_margin_mode(self, value: impl Into<MarginMode>) -> Self
Sets the margin_mode field of this struct.
Sourcepub fn with_percentage(self, value: impl Into<Decimal>) -> Self
pub fn with_percentage(self, value: impl Into<Decimal>) -> Self
Sets the percentage field of this struct.
Sourcepub fn with_pips_precision(self, value: impl Into<i64>) -> Self
pub fn with_pips_precision(self, value: impl Into<i64>) -> Self
Sets the pips_precision field of this struct.
Sourcepub fn with_precision(self, value: impl Into<i64>) -> Self
pub fn with_precision(self, value: impl Into<i64>) -> Self
Sets the precision field of this struct.
Sourcepub fn with_profit_mode(self, value: impl Into<ProfitMode>) -> Self
pub fn with_profit_mode(self, value: impl Into<ProfitMode>) -> Self
Sets the profit_mode field of this struct.
Sourcepub fn with_quote_id(self, value: impl Into<QuoteId>) -> Self
pub fn with_quote_id(self, value: impl Into<QuoteId>) -> Self
Sets the quote_id field of this struct.
Sourcepub fn with_short_selling(self, value: impl Into<bool>) -> Self
pub fn with_short_selling(self, value: impl Into<bool>) -> Self
Sets the short_selling field of this struct.
Sourcepub fn with_spread_raw(self, value: impl Into<Decimal>) -> Self
pub fn with_spread_raw(self, value: impl Into<Decimal>) -> Self
Sets the spread_raw field of this struct.
Sourcepub fn with_spread_table(self, value: impl Into<Decimal>) -> Self
pub fn with_spread_table(self, value: impl Into<Decimal>) -> Self
Sets the spread_table field of this struct.
Sourcepub fn with_starting(self, value: impl Into<u64>) -> Self
pub fn with_starting(self, value: impl Into<u64>) -> Self
Sets the starting field of this struct.
Sourcepub fn with_step_rule_id(self, value: impl Into<i64>) -> Self
pub fn with_step_rule_id(self, value: impl Into<i64>) -> Self
Sets the step_rule_id field of this struct.
Sourcepub fn with_stops_level(self, value: impl Into<i64>) -> Self
pub fn with_stops_level(self, value: impl Into<i64>) -> Self
Sets the stops_level field of this struct.
Sourcepub fn with_swap_rollover_3days(self, value: impl Into<i64>) -> Self
pub fn with_swap_rollover_3days(self, value: impl Into<i64>) -> Self
Sets the swap_rollover_3days field of this struct.
Sourcepub fn with_swap_enable(self, value: impl Into<bool>) -> Self
pub fn with_swap_enable(self, value: impl Into<bool>) -> Self
Sets the swap_enable field of this struct.
Sourcepub fn with_swap_long(self, value: impl Into<Decimal>) -> Self
pub fn with_swap_long(self, value: impl Into<Decimal>) -> Self
Sets the swap_long field of this struct.
Sourcepub fn with_swap_short(self, value: impl Into<Decimal>) -> Self
pub fn with_swap_short(self, value: impl Into<Decimal>) -> Self
Sets the swap_short field of this struct.
Sourcepub fn with_swap_type(self, value: impl Into<i64>) -> Self
pub fn with_swap_type(self, value: impl Into<i64>) -> Self
Sets the swap_type field of this struct.
Sourcepub fn with_symbol(self, value: impl Into<String>) -> Self
pub fn with_symbol(self, value: impl Into<String>) -> Self
Sets the symbol field of this struct.
Sourcepub fn with_tick_size(self, value: impl Into<Decimal>) -> Self
pub fn with_tick_size(self, value: impl Into<Decimal>) -> Self
Sets the tick_size field of this struct.
Sourcepub fn with_tick_value(self, value: impl Into<Decimal>) -> Self
pub fn with_tick_value(self, value: impl Into<Decimal>) -> Self
Sets the tick_value field of this struct.
Sourcepub fn with_time_string(self, value: impl Into<String>) -> Self
pub fn with_time_string(self, value: impl Into<String>) -> Self
Sets the time_string field of this struct.
Sourcepub fn with_trailing_enabled(self, value: impl Into<bool>) -> Self
pub fn with_trailing_enabled(self, value: impl Into<bool>) -> Self
Sets the trailing_enabled field of this struct.
Sourcepub fn with_type_(self, value: impl Into<i64>) -> Self
pub fn with_type_(self, value: impl Into<i64>) -> Self
Sets the type_ field of this struct.
Trait Implementations§
Source§impl Clone for SymbolRecord
impl Clone for SymbolRecord
Source§fn clone(&self) -> SymbolRecord
fn clone(&self) -> SymbolRecord
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more