Class: IGMarkets::Streaming::MarketUpdate

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

Overview

Contains details on a market 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

#bidFloat

The bid attribute.

Returns:

  • (Float)

5
# File 'lib/ig_markets/streaming/market_update.rb', line 5

attribute :bid, Float

#changeFloat

The change attribute.

Returns:

  • (Float)

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

attribute :change, Float

#change_pctFloat

The change_pct attribute.

Returns:

  • (Float)

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

attribute :change_pct, Float

#epicString

The epic attribute.

Returns:

  • (String)

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

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

#highFloat

The high attribute.

Returns:

  • (Float)

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

attribute :high, Float

#lowFloat

The low attribute.

Returns:

  • (Float)

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

attribute :low, Float

#market_delayBoolean

The market_delay attribute.

Returns:


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

attribute :market_delay, Boolean

#market_stateSymbol

The market_state attribute.

Returns:

  • (Symbol)

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

attribute :market_state, Symbol, allowed_values: %i[closed offline tradeable edit auction
auction_no_edit suspended unavailable]

#mid_openFloat

The mid_open attribute.

Returns:

  • (Float)

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

attribute :mid_open, Float

#oddsFloat

The odds attribute.

Returns:

  • (Float)

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

attribute :odds, Float

#offerFloat

The offer attribute.

Returns:

  • (Float)

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

attribute :offer, Float

#strike_priceFloat

The strike_price attribute.

Returns:

  • (Float)

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

attribute :strike_price, Float

#update_timeObject

The update_time attribute.

Returns:

  • []


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

attribute :update_time