Class: IGMarkets::DealConfirmation

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

Overview

Contains details on a single dealing event. Returned by IGMarkets::DealingPlatform#deal_confirmation.

Defined Under Namespace

Classes: AffectedDeal

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

#account_idObject

The account_id attribute.

Returns:



10
# File 'lib/ig_markets/deal_confirmation.rb', line 10

attribute :account_id

#affected_dealsAffectedDeal

The affected_deals attribute.

Returns:



11
# File 'lib/ig_markets/deal_confirmation.rb', line 11

attribute :affected_deals, AffectedDeal

#channelObject

The channel attribute.

Returns:



12
# File 'lib/ig_markets/deal_confirmation.rb', line 12

attribute :channel

#dateTime

The date attribute.

Returns:

  • (Time)


13
# File 'lib/ig_markets/deal_confirmation.rb', line 13

attribute :date, Time, format: ['%FT%T.%L', '%FT%T']

#deal_idObject

The deal_id attribute.

Returns:



14
# File 'lib/ig_markets/deal_confirmation.rb', line 14

attribute :deal_id

#deal_referenceObject

The deal_reference attribute.

Returns:



15
# File 'lib/ig_markets/deal_confirmation.rb', line 15

attribute :deal_reference

#deal_statusSymbol

The deal_status attribute.

Returns:

  • (Symbol)


16
# File 'lib/ig_markets/deal_confirmation.rb', line 16

attribute :deal_status, Symbol, allowed_values: %i[accepted fund_account rejected]

#directionSymbol

The direction attribute.

Returns:

  • (Symbol)


17
# File 'lib/ig_markets/deal_confirmation.rb', line 17

attribute :direction, Symbol, allowed_values: %i[buy sell]

#epicString

The epic attribute.

Returns:

  • (String)


18
# File 'lib/ig_markets/deal_confirmation.rb', line 18

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

#expiryDate

The expiry attribute.

Returns:

  • (Date)


19
# File 'lib/ig_markets/deal_confirmation.rb', line 19

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

#guaranteed_stopBoolean

The guaranteed_stop attribute.

Returns:



20
# File 'lib/ig_markets/deal_confirmation.rb', line 20

attribute :guaranteed_stop, Boolean

#levelFloat

The level attribute.

Returns:

  • (Float)


21
# File 'lib/ig_markets/deal_confirmation.rb', line 21

attribute :level, Float

#limit_distanceInteger

The limit_distance attribute.

Returns:

  • (Integer)


22
# File 'lib/ig_markets/deal_confirmation.rb', line 22

attribute :limit_distance, Integer

#limit_levelFloat

The limit_level attribute.

Returns:

  • (Float)


23
# File 'lib/ig_markets/deal_confirmation.rb', line 23

attribute :limit_level, Float

#profitFloat

The profit attribute.

Returns:

  • (Float)


24
# File 'lib/ig_markets/deal_confirmation.rb', line 24

attribute :profit, Float

#profit_currencyString

The profit_currency attribute.

Returns:

  • (String)


25
# File 'lib/ig_markets/deal_confirmation.rb', line 25

attribute :profit_currency, String, regex: Regex::CURRENCY

#reasonSymbol

The reason attribute.

Returns:

  • (Symbol)


26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/ig_markets/deal_confirmation.rb', line 26

attribute :reason, Symbol, allowed_values: %i[account_not_enabled_to_trading attached_order_level_error
attached_order_trailing_stop_error cannot_change_stop_type
cannot_remove_stop closing_only_trades_accepted_on_this_market
conflicting_order contact_support_instrument_error cr_spacing
duplicate_order_error exchange_manual_override
finance_repeat_dealing force_open_on_same_market_different_currency
general_error good_till_date_in_the_past instrument_not_found
insufficient_funds level_tolerance_error manual_order_timeout
market_closed market_closed_with_edits market_closing
market_not_borrowable market_offline market_phone_only
market_rolled market_unavailable_to_client max_auto_size_exceeded
minimum_order_size_error move_away_only_limit move_away_only_stop
move_away_only_trigger_level opposing_direction_orders_not_allowed
opposing_positions_not_allowed order_locked order_not_found
over_normal_market_size partially_closed_position_not_deleted
position_not_available_to_close position_not_found
reject_spreadbet_order_on_cfd_account size_increment
sprint_market_expiry_after_market_close stop_or_limit_not_allowed
stop_required_error strike_level_tolerance success
trailing_stop_not_allowed unknown wrong_side_of_market]

#sizeFloat

The size attribute.

Returns:

  • (Float)


46
# File 'lib/ig_markets/deal_confirmation.rb', line 46

attribute :size, Float

#statusSymbol

The status attribute.

Returns:

  • (Symbol)


47
# File 'lib/ig_markets/deal_confirmation.rb', line 47

attribute :status, Symbol, allowed_values: %i[amended closed deleted open partially_closed]

#stop_distanceInteger

The stop_distance attribute.

Returns:

  • (Integer)


48
# File 'lib/ig_markets/deal_confirmation.rb', line 48

attribute :stop_distance, Integer

#stop_levelFloat

The stop_level attribute.

Returns:

  • (Float)


49
# File 'lib/ig_markets/deal_confirmation.rb', line 49

attribute :stop_level, Float

#trailing_stopBoolean

The trailing_stop attribute.

Returns:



50
# File 'lib/ig_markets/deal_confirmation.rb', line 50

attribute :trailing_stop, Boolean