Permalink
Browse files

NextValidId source file separated

  • Loading branch information...
1 parent ea43ce3 commit e3426f2fd80e7878470a06dbe63b6ee7ba87f124 @arvicco committed Apr 19, 2012
Showing with 19 additions and 5 deletions.
  1. +1 −5 lib/ib-ruby/messages/incoming.rb
  2. +18 −0 lib/ib-ruby/messages/incoming/next_valid_id.rb
@@ -26,11 +26,6 @@ module Incoming
AccountUpdateTime = def_message 8, [:time_stamp, :string]
- # This message is always sent by TWS automatically at connect.
- # The IB::Connection class subscribes to it automatically and stores
- # the order id in its @next_order_id attribute.
- NextValidID = NextValidId = def_message(9, [:order_id, :int])
-
NewsBulletins =
def_message 14, [:request_id, :int], # unique incrementing bulletin ID.
[:type, :int], # Type of bulletin. Valid values include:
@@ -87,6 +82,7 @@ module Incoming
require 'ib-ruby/messages/incoming/execution_data'
require 'ib-ruby/messages/incoming/historical_data'
require 'ib-ruby/messages/incoming/market_depths'
+ require 'ib-ruby/messages/incoming/next_valid_id'
require 'ib-ruby/messages/incoming/open_order'
require 'ib-ruby/messages/incoming/order_status'
require 'ib-ruby/messages/incoming/portfolio_value'
@@ -0,0 +1,18 @@
+module IB
+ module Messages
+ module Incoming
+
+ # This message is always sent by TWS automatically at connect.
+ # The IB::Connection class subscribes to it automatically and stores
+ # the order id in its @next_order_id attribute.
+ NextValidID = NextValidId = def_message(9, [:local_id, :int])
+
+ class NextValidId
+
+ # Legacy accessor
+ alias order_id local_id
+
+ end # class NextValidId
+ end # module Incoming
+ end # module Messages
+end # module IB

0 comments on commit e3426f2

Please sign in to comment.