class IB::Execution

This is IB Order execution report.

Public Instance Methods

==(other) click to toggle source

Comparison

Calls superclass method IB::BaseProperties#==
# File lib/models/ib/execution.rb, line 42
def == other
  super(other) ||
    other.is_a?(self.class) &&
    perm_id == other.perm_id &&
    local_id == other.local_id && # ((p __LINE__)||true) &&
    client_id == other.client_id &&
    exec_id == other.exec_id &&
    time == other.time &&
    exchange == other.exchange &&
    order_ref == other.order_ref &&
    side == other.side
  # TODO: || compare all attributes!
end
default_attributes() click to toggle source
Calls superclass method IB::BaseProperties#default_attributes
# File lib/models/ib/execution.rb, line 32
def default_attributes
  super.merge :local_id => 0,
    :client_id => 0,
    :quantity => 0,
    :price => 0,
    :perm_id => 0,
    :liquidation => false
end
to_human() click to toggle source
# File lib/models/ib/execution.rb, line 56
def to_human
  "<Execution: #{time} #{side} #{quantity} at #{price} on #{exchange}, " +
    "cumulative #{cumulative_quantity} at #{average_price}, " +
    "ids #{local_id}/#{perm_id}/#{exec_id}>"
end
Also aliased as: to_s
to_s()
Alias for: to_human