Sha256: 7dc723409b5849ec579dde6fbcec94c3f6245462a68e1af5f6bd63c03dd09394

Contents?: true

Size: 575 Bytes

Versions: 9

Compression:

Stored size: 575 Bytes

Contents

module IEX
  module Resources
    module Chart
      class Default < Base
        property 'open'
        property 'close'
        property 'unadjusted_volume', from: 'unadjustedVolume'
        property 'change'
        property 'change_percent', from: 'changePercent'
        property 'change_percent_s', from: 'changePercent', with: lambda { |v|
          [
            v > 0 ? '+' : '',
            format('%.2f', v),
            '%'
          ].join
        } # change in percent as a String with a leading + or - sign
        property 'vwap'
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
iex-ruby-client-0.4.4 lib/iex/resources/chart/default.rb
iex-ruby-client-0.4.3 lib/iex/resources/chart/default.rb
iex-ruby-client-0.4.2 lib/iex/resources/chart/default.rb
iex-ruby-client-0.4.1 lib/iex/resources/chart/default.rb
iex-ruby-client-0.4.0 lib/iex/resources/chart/default.rb
iex-ruby-client-0.3.3 lib/iex/resources/chart/default.rb
iex-ruby-client-0.3.2 lib/iex/resources/chart/default.rb
iex-ruby-client-0.3.1 lib/iex/resources/chart/default.rb
iex-ruby-client-0.3.0 lib/iex/resources/chart/default.rb