bin/option_data in ib-ruby-0.5.19 vs bin/option_data in ib-ruby-0.5.21
- old
+ new
@@ -29,15 +29,15 @@
# In this case, we just print out the tick.
#
# (N.B. The description field is not from IB TWS. It is defined
# locally in forex.rb, and is just arbitrary text.)
ib.subscribe(:TickPrice, :TickSize, :TickOption, :TickString) do |msg|
- puts @market[msg.data[:id]].description + ": " + msg.to_human
+ puts @market[msg.ticker_id].description + ": " + msg.to_human
end
# Now we actually request market data for the symbols we're interested in.
@market.each_pair do |id, contract|
- ib.send_message :RequestMarketData, :id => id, :contract => contract
+ ib.send_message :RequestMarketData, :ticker_id => id, :contract => contract
end
puts "\nSubscribed to market data"
puts "\n******** Press <Enter> to cancel... *********\n\n"
STDIN.gets