Class: IB::OutgoingMessages::ExerciseOptions

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

Overview

data = { :ticker_id => int,

:contract => Contract,
:exercise_action => int,
:exercise_quantity => int,
:account => string,
:override => int } ## override? override what?

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



671
672
673
# File 'lib/ib-ruby/messages.rb', line 671

def self.message_id
  21
end

Instance Method Details

#queue(server) ⇒ Object



675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
# File 'lib/ib-ruby/messages.rb', line 675

def queue(server)

  requireVersion(server, 21)

  q = [self.class.message_id,
       1, # version
       @data[:ticker_id]
      ]
  q.concat(@data[:contract].serialize_long(server[:version]))
  q.concat([
            @data[:exercise_action],
            @data[:exercise_quantity],
            @data[:account],
            @data[:override]
           ])
  q
end