lib/ib/messages/incoming/execution_data.rb in ib-ruby-0.8.5 vs lib/ib/messages/incoming/execution_data.rb in ib-ruby-0.9.0

- old
+ new

@@ -11,10 +11,11 @@ [:contract, :symbol, :string], [:contract, :sec_type, :string], [:contract, :expiry, :string], [:contract, :strike, :decimal], [:contract, :right, :string], + [:contract, :multiplier, :string], [:contract, :exchange, :string], [:contract, :currency, :string], [:contract, :local_symbol, :string], [:execution, :exec_id, :string], # Weird format @@ -26,28 +27,22 @@ [:execution, :price, :decimal], [:execution, :perm_id, :int], [:execution, :client_id, :int], [:execution, :liquidation, :int], [:execution, :cumulative_quantity, :int], - [:execution, :average_price, :decimal] + [:execution, :average_price, :decimal], + [:execution, :order_ref, :string], + [:execution, :ev_rule, :string], + [:execution, :ev_multiplier, :decimal] class ExecutionData def contract @contract = IB::Contract.build @data[:contract] end def execution @execution = IB::Execution.new @data[:execution] - end - - def load - super - - # As of client v.53, we can receive orderRef in ExecutionData - load_map [proc { | | @server[:client_version] >= 53 }, - [:execution, :order_ref, :string] - ] end def to_human "<ExecutionData #{request_id}: #{contract.to_human}, #{execution}>" end