Class: IGMarkets::ClientSentiment

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

Overview

Contains details on client sentiment for a single market. Returned by DealingPlatform::ClientSentimentMethods#[] and #related_sentiments.

Instance Attribute Summary

Attributes inherited from Model

#attributes

Instance Method Summary collapse

Methods inherited from Model

#==, allowed_values, attribute, defined_attribute_names, from, #initialize, #inspect

Constructor Details

This class inherits a constructor from IGMarkets::Model

Instance Method Details

#long_position_percentageFloat

The long_position_percentage attribute.

Returns:

  • (Float)


5
# File 'lib/ig_markets/client_sentiment.rb', line 5

attribute :long_position_percentage, Float

#market_idObject

The market_id attribute.

Returns:



6
# File 'lib/ig_markets/client_sentiment.rb', line 6

attribute :market_id

Returns client sentiments for markets that are related to this one.

Returns:



12
13
14
# File 'lib/ig_markets/client_sentiment.rb', line 12

def related_sentiments
  @dealing_platform.gather "clientsentiment/related/#{market_id}", :client_sentiments, ClientSentiment
end

#short_position_percentageFloat

The short_position_percentage attribute.

Returns:

  • (Float)


7
# File 'lib/ig_markets/client_sentiment.rb', line 7

attribute :short_position_percentage, Float