Class IB::IncomingMessages::ExecutionData
In: messages.rb
Parent: AbstractMessage

Methods

load   message_id  

Attributes

contract  [RW] 
execution  [RW] 

Public Class methods

[Source]

      # File messages.rb, line 1019
1019:       def self.message_id
1020:         11
1021:       end

Public Instance methods

[Source]

      # File messages.rb, line 1023
1023:       def load
1024:         @contract = Datatypes::Contract.new
1025:         @execution = Datatypes::Execution.new
1026: 
1027:         autoload([:version, :int], [:order_id, :int])
1028: 
1029:         @contract.symbol = @socket.read_string
1030:         @contract.sec_type = @socket.read_string
1031:         @contract.expiry = @socket.read_string
1032:         @contract.strike = @socket.read_decimal
1033:         @contract.right = @socket.read_string
1034:         @contract.currency = @socket.read_string
1035:         @contract.local_symbol = @socket.read_string if @data[:version] >= 2
1036: 
1037:         @execution.order_id = @data[:order_id]
1038:         @execution.exec_id = @socket.read_string
1039:         @execution.time = @socket.read_string
1040:         @execution.account_number = @socket.read_string
1041:         @execution.exchange = @socket.read_string
1042:         @execution.side = @socket.read_string
1043:         @execution.shares = @socket.read_int
1044:         @execution.price = @socket.read_decimal
1045: 
1046:         @execution.perm_id = @socket.read_int if @data[:version] >= 2
1047:         @execution.client_id = @socket.read_int if @data[:version] >= 3
1048:         @execution.liquidation = @socket.read_int if @data[:version] >= 4
1049:       end

[Validate]