Sha256: 76a006fe4879bc99b7244a78e3856c6b4d92f14f6b0d6f3fb7515dc278691217

Contents?: true

Size: 1.17 KB

Versions: 13

Compression:

Stored size: 1.17 KB

Contents

module IB
  module Messages
    module Incoming

      # RealTimeBar contains following @data:
      #    :request_id - The ID of the *request* to which this is responding
      #    :time - The date-time stamp of the start of the bar. The format is offset in
      #            seconds from the beginning of 1970, same format as the UNIX epoch time
      #    :bar - received RT Bar
      RealTimeBar = def_message 50,
                                [:request_id, :int],
                                [:bar, :time, :int],
                                [:bar, :open, :decimal],
                                [:bar, :high, :decimal],
                                [:bar, :low, :decimal],
                                [:bar, :close, :decimal],
                                [:bar, :volume, :int],
                                [:bar, :wap, :decimal],
                                [:bar, :trades, :int]
      class RealTimeBar
        def bar
          @bar = IB::Bar.new @data[:bar]
        end

        def to_human
          "<RealTimeBar: #{request_id} #{time}, #{bar}>"
        end
      end # RealTimeBar

    end # module Incoming
  end # module Messages
end # module IB

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ib-ruby-0.9.1 lib/ib/messages/incoming/real_time_bar.rb
ib-ruby-0.9.0 lib/ib/messages/incoming/real_time_bar.rb
ib-ruby-0.8.5 lib/ib/messages/incoming/real_time_bar.rb
ib-ruby-0.8.4 lib/ib/messages/incoming/real_time_bar.rb
ib-ruby-0.8.3 lib/ib/messages/incoming/real_time_bar.rb
ib-ruby-0.8.1 lib/ib-ruby/messages/incoming/real_time_bar.rb
ib-ruby-0.8.0 lib/ib-ruby/messages/incoming/real_time_bar.rb
ib-ruby-0.7.12 lib/ib-ruby/messages/incoming/real_time_bar.rb
ib-ruby-0.7.11 lib/ib-ruby/messages/incoming/real_time_bar.rb
ib-ruby-0.7.10 lib/ib-ruby/messages/incoming/real_time_bar.rb
ib-ruby-0.7.9 lib/ib-ruby/messages/incoming/real_time_bar.rb
ib-ruby-0.7.8 lib/ib-ruby/messages/incoming/real_time_bar.rb
ib-ruby-0.7.6 lib/ib-ruby/messages/incoming/real_time_bar.rb