Class: IB::OutgoingMessages::RequestAccountData

Inherits:
AbstractMessage show all
Defined in:
lib/ib-ruby/messages.rb

Overview

Data is { :subscribe => boolean, :account_code => string }

:account_code is only necessary for advisor accounts. Set it to empty (”) for a standard account.

Instance Attribute Summary

Attributes inherited from ExtremelyAbstractMessage

#created_at

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractMessage

#initialize, #send

Methods inherited from ExtremelyAbstractMessage

#to_human

Constructor Details

This class inherits a constructor from IB::OutgoingMessages::AbstractMessage

Class Method Details

.message_idObject



280
281
282
# File 'lib/ib-ruby/messages.rb', line 280

def self.message_id
  6
end

Instance Method Details

#queue(server) ⇒ Object



283
284
285
286
287
288
289
290
# File 'lib/ib-ruby/messages.rb', line 283

def queue(server)
  queue = [ self.class.message_id,
            2, # version
            @data[:subscribe]
          ]
  queue.push(@data[:account_code]) if server[:version] >= 9
  queue
end