Class: IGMarkets::Streaming::PositionUpdate
- Defined in:
- lib/ig_markets/streaming/position_update.rb
Overview
Contains details on a position update received via the streaming API. Used by Subscription#on_data.
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
-
#account_id ⇒ Object
The account_id attribute.
-
#channel ⇒ Object
The channel attribute.
-
#currency ⇒ Object
The currency attribute.
-
#deal_id ⇒ Object
The deal_id attribute.
-
#deal_id_origin ⇒ Object
The deal_id_origin attribute.
-
#deal_reference ⇒ Object
The deal_reference attribute.
-
#deal_status ⇒ Symbol
The deal_status attribute.
-
#direction ⇒ Symbol
The direction attribute.
-
#epic ⇒ String
The epic attribute.
-
#expiry ⇒ Date
The expiry attribute.
-
#guaranteed_stop ⇒ Boolean
The guaranteed_stop attribute.
-
#level ⇒ Float
The level attribute.
-
#limit_level ⇒ Float
The limit_level attribute.
-
#size ⇒ Float
The size attribute.
-
#status ⇒ Symbol
The status attribute.
-
#stop_level ⇒ Float
The stop_level attribute.
-
#timestamp ⇒ Time
The timestamp attribute.
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_id ⇒ Object
The account_id attribute.
5 |
# File 'lib/ig_markets/streaming/position_update.rb', line 5 attribute :account_id |
#channel ⇒ Object
The channel attribute.
6 |
# File 'lib/ig_markets/streaming/position_update.rb', line 6 attribute :channel |
#currency ⇒ Object
The currency attribute.
7 |
# File 'lib/ig_markets/streaming/position_update.rb', line 7 attribute :currency |
#deal_id ⇒ Object
The deal_id attribute.
8 |
# File 'lib/ig_markets/streaming/position_update.rb', line 8 attribute :deal_id |
#deal_id_origin ⇒ Object
The deal_id_origin attribute.
9 |
# File 'lib/ig_markets/streaming/position_update.rb', line 9 attribute :deal_id_origin |
#deal_reference ⇒ Object
The deal_reference attribute.
10 |
# File 'lib/ig_markets/streaming/position_update.rb', line 10 attribute :deal_reference |
#deal_status ⇒ Symbol
The deal_status attribute.
11 |
# File 'lib/ig_markets/streaming/position_update.rb', line 11 attribute :deal_status, Symbol, allowed_values: %i[accepted rejected] |
#direction ⇒ Symbol
The direction attribute.
12 |
# File 'lib/ig_markets/streaming/position_update.rb', line 12 attribute :direction, Symbol, allowed_values: %i[buy sell] |
#epic ⇒ String
The epic attribute.
13 |
# File 'lib/ig_markets/streaming/position_update.rb', line 13 attribute :epic, String, regex: Regex::EPIC |
#expiry ⇒ Date
The expiry attribute.
14 |
# File 'lib/ig_markets/streaming/position_update.rb', line 14 attribute :expiry, Date, nil_if: %w[- DFB], format: ['%d-%b-%y', '%b-%y'] |
#guaranteed_stop ⇒ Boolean
The guaranteed_stop attribute.
15 |
# File 'lib/ig_markets/streaming/position_update.rb', line 15 attribute :guaranteed_stop, Boolean |
#level ⇒ Float
The level attribute.
16 |
# File 'lib/ig_markets/streaming/position_update.rb', line 16 attribute :level, Float |
#limit_level ⇒ Float
The limit_level attribute.
17 |
# File 'lib/ig_markets/streaming/position_update.rb', line 17 attribute :limit_level, Float |
#size ⇒ Float
The size attribute.
18 |
# File 'lib/ig_markets/streaming/position_update.rb', line 18 attribute :size, Float |
#status ⇒ Symbol
The status attribute.
19 |
# File 'lib/ig_markets/streaming/position_update.rb', line 19 attribute :status, Symbol, allowed_values: %i[deleted open updated] |
#stop_level ⇒ Float
The stop_level attribute.
20 |
# File 'lib/ig_markets/streaming/position_update.rb', line 20 attribute :stop_level, Float |
#timestamp ⇒ Time
The timestamp attribute.
21 |
# File 'lib/ig_markets/streaming/position_update.rb', line 21 attribute :timestamp, Time, format: ['%FT%T.%L', '%FT%T'] |