SymbolRecord

Struct SymbolRecord 

Source
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

Source

pub fn with_ask(self, value: impl Into<Decimal>) -> Self

Sets the ask field of this struct.

Source

pub fn with_bid(self, value: impl Into<Decimal>) -> Self

Sets the bid field of this struct.

Source

pub fn with_category_name(self, value: impl Into<String>) -> Self

Sets the category_name field of this struct.

Source

pub fn with_contract_size(self, value: impl Into<i64>) -> Self

Sets the contract_size field of this struct.

Source

pub fn with_currency(self, value: impl Into<String>) -> Self

Sets the currency field of this struct.

Source

pub fn with_currency_pair(self, value: impl Into<bool>) -> Self

Sets the currency_pair field of this struct.

Source

pub fn with_currency_profit(self, value: impl Into<String>) -> Self

Sets the currency_profit field of this struct.

Source

pub fn with_description(self, value: impl Into<String>) -> Self

Sets the description field of this struct.

Source

pub fn with_expiration(self, value: impl Into<u64>) -> Self

Sets the expiration field of this struct.

Source

pub fn with_group_name(self, value: impl Into<String>) -> Self

Sets the group_name field of this struct.

Source

pub fn with_high(self, value: impl Into<Decimal>) -> Self

Sets the high field of this struct.

Source

pub fn with_initial_margin(self, value: impl Into<i64>) -> Self

Sets the initial_margin field of this struct.

Source

pub fn with_instant_max_volume(self, value: impl Into<i64>) -> Self

Sets the instant_max_volume field of this struct.

Source

pub fn with_leverage(self, value: impl Into<Decimal>) -> Self

Sets the leverage field of this struct.

Source

pub fn with_long_only(self, value: impl Into<bool>) -> Self

Sets the long_only field of this struct.

Source

pub fn with_lot_max(self, value: impl Into<Decimal>) -> Self

Sets the lot_max field of this struct.

Source

pub fn with_lot_min(self, value: impl Into<Decimal>) -> Self

Sets the lot_min field of this struct.

Source

pub fn with_lot_step(self, value: impl Into<Decimal>) -> Self

Sets the lot_step field of this struct.

Source

pub fn with_low(self, value: impl Into<Decimal>) -> Self

Sets the low field of this struct.

Source

pub fn with_margin_hedged(self, value: impl Into<i64>) -> Self

Sets the margin_hedged field of this struct.

Source

pub fn with_margin_hedged_strong(self, value: impl Into<bool>) -> Self

Sets the margin_hedged_strong field of this struct.

Source

pub fn with_margin_maintenance(self, value: impl Into<i64>) -> Self

Sets the margin_maintenance field of this struct.

Source

pub fn with_margin_mode(self, value: impl Into<MarginMode>) -> Self

Sets the margin_mode field of this struct.

Source

pub fn with_percentage(self, value: impl Into<Decimal>) -> Self

Sets the percentage field of this struct.

Source

pub fn with_pips_precision(self, value: impl Into<i64>) -> Self

Sets the pips_precision field of this struct.

Source

pub fn with_precision(self, value: impl Into<i64>) -> Self

Sets the precision field of this struct.

Source

pub fn with_profit_mode(self, value: impl Into<ProfitMode>) -> Self

Sets the profit_mode field of this struct.

Source

pub fn with_quote_id(self, value: impl Into<QuoteId>) -> Self

Sets the quote_id field of this struct.

Source

pub fn with_short_selling(self, value: impl Into<bool>) -> Self

Sets the short_selling field of this struct.

Source

pub fn with_spread_raw(self, value: impl Into<Decimal>) -> Self

Sets the spread_raw field of this struct.

Source

pub fn with_spread_table(self, value: impl Into<Decimal>) -> Self

Sets the spread_table field of this struct.

Source

pub fn with_starting(self, value: impl Into<u64>) -> Self

Sets the starting field of this struct.

Source

pub fn with_step_rule_id(self, value: impl Into<i64>) -> Self

Sets the step_rule_id field of this struct.

Source

pub fn with_stops_level(self, value: impl Into<i64>) -> Self

Sets the stops_level field of this struct.

Source

pub fn with_swap_rollover_3days(self, value: impl Into<i64>) -> Self

Sets the swap_rollover_3days field of this struct.

Source

pub fn with_swap_enable(self, value: impl Into<bool>) -> Self

Sets the swap_enable field of this struct.

Source

pub fn with_swap_long(self, value: impl Into<Decimal>) -> Self

Sets the swap_long field of this struct.

Source

pub fn with_swap_short(self, value: impl Into<Decimal>) -> Self

Sets the swap_short field of this struct.

Source

pub fn with_swap_type(self, value: impl Into<i64>) -> Self

Sets the swap_type field of this struct.

Source

pub fn with_symbol(self, value: impl Into<String>) -> Self

Sets the symbol field of this struct.

Source

pub fn with_tick_size(self, value: impl Into<Decimal>) -> Self

Sets the tick_size field of this struct.

Source

pub fn with_tick_value(self, value: impl Into<Decimal>) -> Self

Sets the tick_value field of this struct.

Source

pub fn with_time(self, value: impl Into<u64>) -> Self

Sets the time field of this struct.

Source

pub fn with_time_string(self, value: impl Into<String>) -> Self

Sets the time_string field of this struct.

Source

pub fn with_trailing_enabled(self, value: impl Into<bool>) -> Self

Sets the trailing_enabled field of this struct.

Source

pub fn with_type_(self, value: impl Into<i64>) -> Self

Sets the type_ field of this struct.

Trait Implementations§

Source§

impl Clone for SymbolRecord

Source§

fn clone(&self) -> SymbolRecord

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 SymbolRecord

Source§

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

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

impl Default for SymbolRecord

Source§

fn default() -> SymbolRecord

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

impl<'de> Deserialize<'de> for SymbolRecord

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 PartialEq for SymbolRecord

Source§

fn eq(&self, other: &SymbolRecord) -> 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 SymbolRecord

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 SymbolRecord

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> 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>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,