Class: IGMarkets::Streaming::WorkingOrderUpdate

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

Overview

Contains details on a working order update received via the streaming API. Used by Subscription#on_data.

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:



6
# File 'lib/ig_markets/streaming/working_order_update.rb', line 6

attribute :account_id

#channelObject

The channel attribute.

Returns:



7
# File 'lib/ig_markets/streaming/working_order_update.rb', line 7

attribute :channel

#currencyString

The currency attribute.

Returns:

  • (String)


8
# File 'lib/ig_markets/streaming/working_order_update.rb', line 8

attribute :currency, String, regex: Regex::CURRENCY

#deal_idObject

The deal_id attribute.

Returns:



9
# File 'lib/ig_markets/streaming/working_order_update.rb', line 9

attribute :deal_id

#deal_referenceObject

The deal_reference attribute.

Returns:



10
# File 'lib/ig_markets/streaming/working_order_update.rb', line 10

attribute :deal_reference

#deal_statusSymbol

The deal_status attribute.

Returns:

  • (Symbol)


11
# File 'lib/ig_markets/streaming/working_order_update.rb', line 11

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

#directionSymbol

The direction attribute.

Returns:

  • (Symbol)


12
# File 'lib/ig_markets/streaming/working_order_update.rb', line 12

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

#epicString

The epic attribute.

Returns:

  • (String)


13
# File 'lib/ig_markets/streaming/working_order_update.rb', line 13

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

#expiryDate

The expiry attribute.

Returns:

  • (Date)


14
# File 'lib/ig_markets/streaming/working_order_update.rb', line 14

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

#good_till_dateTime

The good_till_date attribute.

Returns:

  • (Time)


15
# File 'lib/ig_markets/streaming/working_order_update.rb', line 15

attribute :good_till_date, Time, format: '%FT%T'

#guaranteed_stopBoolean

The guaranteed_stop attribute.

Returns:



16
# File 'lib/ig_markets/streaming/working_order_update.rb', line 16

attribute :guaranteed_stop, Boolean

#levelFloat

The level attribute.

Returns:

  • (Float)


17
# File 'lib/ig_markets/streaming/working_order_update.rb', line 17

attribute :level, Float

#limit_distanceInteger

The limit_distance attribute.

Returns:

  • (Integer)


18
# File 'lib/ig_markets/streaming/working_order_update.rb', line 18

attribute :limit_distance, Integer

#order_typeSymbol

The order_type attribute.

Returns:

  • (Symbol)


19
# File 'lib/ig_markets/streaming/working_order_update.rb', line 19

attribute :order_type, Symbol, allowed_values: %i[limit stop]

#sizeFloat

The size attribute.

Returns:

  • (Float)


20
# File 'lib/ig_markets/streaming/working_order_update.rb', line 20

attribute :size, Float

#statusSymbol

The status attribute.

Returns:

  • (Symbol)


21
# File 'lib/ig_markets/streaming/working_order_update.rb', line 21

attribute :status, Symbol, allowed_values: %i[deleted open updated]

#stop_distanceInteger

The stop_distance attribute.

Returns:

  • (Integer)


22
# File 'lib/ig_markets/streaming/working_order_update.rb', line 22

attribute :stop_distance, Integer

#time_in_forceSymbol

The time_in_force attribute.

Returns:

  • (Symbol)


23
# File 'lib/ig_markets/streaming/working_order_update.rb', line 23

attribute :time_in_force, Symbol, allowed_values: %i[good_till_cancelled good_till_date]

#timestampTime

The timestamp attribute.

Returns:

  • (Time)


24
# File 'lib/ig_markets/streaming/working_order_update.rb', line 24

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