Class | IB::IncomingMessages::TickerPrice |
In: |
messages.rb
|
Parent: | AbstractMessage |
The IB code seems to dispatch up to two wrapped objects for this message, a tickPrice and sometimes a tickSize, which seems to be identical to the TICK_SIZE object.
# File messages.rb, line 740 740: def load 741: autoload([:version, :int], [:ticker_id, :int], [:tick_type, :int], [:price, :decimal]) 742: 743: version_load(2, [:size, :int]) 744: version_load(3, [:can_auto_execute, :int]) 745: 746: if @data[:version] >= 2 747: # the IB code translates these into 0, 3, and 5, respectively, and wraps them in a TICK_SIZE-type wrapper. 748: # May need to revisit this when we figure out exactly what it does. 749: @data[:type] = case @socket.read_int 750: when 1 751: :bid 752: when 2 753: :ask 754: when 4 755: :last 756: else 757: nil 758: end 759: end 760: 761: end