xtb_client::schema

Type Alias GetSymbolResponse

Source
pub type GetSymbolResponse = SymbolRecord;

Aliased Type§

struct GetSymbolResponse {
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,
}

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