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: Decimal
Ask price in base currency
bid: Decimal
Bid price in base currency
category_name: String
Category name
contract_size: i64
Size of 1 lot
currency: String
Currency
currency_pair: bool
Indicates whether the symbol represents a currency pair
currency_profit: String
The currency of calculated profit
description: String
Description
expiration: Option<u64>
Null if not applicable
group_name: String
Symbol group name
high: Decimal
The highest price of the day in base currency
initial_margin: i64
Initial margin for 1 lot order, used for profit/margin calculation
instant_max_volume: i64
Maximum instant volume multiplied by 100 (in lots)
leverage: Decimal
Symbol leverage
long_only: bool
Long only
lot_max: Decimal
Maximum size of trade
lot_min: Decimal
Minimum size of trade
lot_step: Decimal
A value of minimum step by which the size of trade can be changed (within lotMin - lotMax range)
low: Decimal
The lowest price of the day in base currency
margin_hedged: i64
Used for profit calculation
margin_hedged_strong: bool
For margin calculation
margin_maintenance: Option<i64>
For margin calculation, null if not applicable
margin_mode: MarginMode
For margin calculation
percentage: Decimal
Percentage
pips_precision: i64
Number of symbol’s pip decimal places
precision: i64
Number of symbol’s price decimal places
profit_mode: ProfitMode
For profit calculation
quote_id: QuoteId
Source of price
short_selling: bool
Indicates whether short selling is allowed on the instrument
spread_raw: Decimal
The difference between raw ask and bid prices
spread_table: Decimal
Spread representation
starting: Option<u64>
Null if not applicable
step_rule_id: i64
Appropriate step rule ID from getStepRules command response
stops_level: i64
Minimal distance (in pips) from the current price where the stopLoss/takeProfit can be set
swap_rollover_3days: i64
Time when additional swap is accounted for weekend
swap_enable: bool
Indicates whether swap value is added to position on end of day
swap_long: Decimal
Swap value for long positions in pips
swap_short: Decimal
Swap value for short positions in pips
swap_type: i64
Type of swap calculated
symbol: String
Symbol 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: u64
Ask & bid tick time
time_string: String
Time in String
trailing_enabled: bool
Indicates whether trailing stop (offset) is applicable to the instrument.
type_: i64
Instrument 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