Class: IGMarkets::Instrument

Inherits:
Model
  • Object
show all
Defined in:
lib/ig_markets/instrument.rb

Overview

Contains details on a tradeable instrument. Returned by Market#instrument.

Defined Under Namespace

Classes: Currency, ExpiryDetails, MarginDepositBand, OpeningHours, RolloverDetails, SlippageFactor

Instance Attribute Summary

Attributes inherited from Model

#attributes

Instance Method Summary collapse

Methods inherited from Model

#==, allowed_values, attribute, attribute_type, attribute_value_allowed?, defined_attribute_names, deprecated_attribute, #initialize, #initialize_copy, #inspect, #to_h, valid_attribute?

Constructor Details

This class inherits a constructor from IGMarkets::Model

Instance Method Details

#chart_codeObject

The chart_code attribute.


59
# File 'lib/ig_markets/instrument.rb', line 59

attribute :chart_code

#contract_sizeObject

The contract_size attribute.


60
# File 'lib/ig_markets/instrument.rb', line 60

attribute :contract_size

#controlled_risk_allowedBoolean

The controlled_risk_allowed attribute.


61
# File 'lib/ig_markets/instrument.rb', line 61

attribute :controlled_risk_allowed, Boolean

#countryObject

The country attribute.


62
# File 'lib/ig_markets/instrument.rb', line 62

attribute :country

#currenciesCurrency

The currencies attribute.


63
# File 'lib/ig_markets/instrument.rb', line 63

attribute :currencies, Currency

#epicString

The epic attribute.


64
# File 'lib/ig_markets/instrument.rb', line 64

attribute :epic, String, regex: Regex::EPIC

#expiryDate

The expiry attribute.


65
# File 'lib/ig_markets/instrument.rb', line 65

attribute :expiry, Date, nil_if: %w[- DFB], format: ['%d-%b-%y', '%b-%y']

#expiry_detailsExpiryDetails

The expiry_details attribute.


66
# File 'lib/ig_markets/instrument.rb', line 66

attribute :expiry_details, ExpiryDetails

#force_open_allowedBoolean

The force_open_allowed attribute.


67
# File 'lib/ig_markets/instrument.rb', line 67

attribute :force_open_allowed, Boolean

#limited_risk_premiumLimitedRiskPremium

The limited_risk_premium attribute.


68
# File 'lib/ig_markets/instrument.rb', line 68

attribute :limited_risk_premium, LimitedRiskPremium

#lot_sizeFloat

The lot_size attribute.


69
# File 'lib/ig_markets/instrument.rb', line 69

attribute :lot_size, Float

#margin_deposit_bandsMarginDepositBand

The margin_deposit_bands attribute.


70
# File 'lib/ig_markets/instrument.rb', line 70

attribute :margin_deposit_bands, MarginDepositBand

#margin_factorFloat

The margin_factor attribute.


71
# File 'lib/ig_markets/instrument.rb', line 71

attribute :margin_factor, Float

#margin_factor_unitSymbol

The margin_factor_unit attribute.


72
# File 'lib/ig_markets/instrument.rb', line 72

attribute :margin_factor_unit, Symbol, allowed_values: %i[percentage points]

#market_idObject

The market_id attribute.


73
# File 'lib/ig_markets/instrument.rb', line 73

attribute :market_id

#nameObject

The name attribute.


74
# File 'lib/ig_markets/instrument.rb', line 74

attribute :name

#news_codeObject

The news_code attribute.


75
# File 'lib/ig_markets/instrument.rb', line 75

attribute :news_code

#one_pip_meansObject

The one_pip_means attribute.


76
# File 'lib/ig_markets/instrument.rb', line 76

attribute :one_pip_means

#opening_hoursOpeningHours

The opening_hours attribute.


77
# File 'lib/ig_markets/instrument.rb', line 77

attribute :opening_hours, OpeningHours

#rollover_detailsRolloverDetails

The rollover_details attribute.


78
# File 'lib/ig_markets/instrument.rb', line 78

attribute :rollover_details, RolloverDetails

#slippage_factorSlippageFactor

The slippage_factor attribute.


79
# File 'lib/ig_markets/instrument.rb', line 79

attribute :slippage_factor, SlippageFactor

#special_infoObject

The special_info attribute.


80
# File 'lib/ig_markets/instrument.rb', line 80

attribute :special_info

#sprint_markets_maximum_expiry_timeFloat

The sprint_markets_maximum_expiry_time attribute.


81
# File 'lib/ig_markets/instrument.rb', line 81

attribute :sprint_markets_maximum_expiry_time, Float

#sprint_markets_minimum_expiry_timeFloat

The sprint_markets_minimum_expiry_time attribute.


82
# File 'lib/ig_markets/instrument.rb', line 82

attribute :sprint_markets_minimum_expiry_time, Float

#stops_limits_allowedBoolean

The stops_limits_allowed attribute.


83
# File 'lib/ig_markets/instrument.rb', line 83

attribute :stops_limits_allowed, Boolean

#streaming_prices_availableBoolean

The streaming_prices_available attribute.


84
# File 'lib/ig_markets/instrument.rb', line 84

attribute :streaming_prices_available, Boolean

#typeSymbol

The type attribute.


85
86
87
88
# File 'lib/ig_markets/instrument.rb', line 85

attribute :type, Symbol, allowed_values: %i[binary bungee_capped bungee_commodities bungee_currencies
bungee_indices commodities currencies indices opt_commodities
opt_currencies opt_indices opt_rates opt_shares rates sectors
shares sprint_market test_market unknown]

#unitSymbol

The unit attribute.


89
# File 'lib/ig_markets/instrument.rb', line 89

attribute :unit, Symbol, allowed_values: %i[amount contracts shares]

#value_of_one_pipObject

The value_of_one_pip attribute.


90
# File 'lib/ig_markets/instrument.rb', line 90

attribute :value_of_one_pip