Class: IB::Messages::Incoming::PortfolioValue

Inherits:
Object
  • Object
show all
Defined in:
lib/ib/messages/incoming/portfolio_value.rb

Instance Method Summary collapse

Instance Method Details

#contractObject



25
26
27
# File 'lib/ib/messages/incoming/portfolio_value.rb', line 25

def contract
  @contract = IB::Contract.build @data[:contract]
end

#to_humanObject



29
30
31
32
33
# File 'lib/ib/messages/incoming/portfolio_value.rb', line 29

def to_human
  "<PortfolioValue: #{contract.to_human} (#{position}): Market #{market_price}" +
      " price #{market_value} value; PnL: #{unrealized_pnl} unrealized," +
      " #{realized_pnl} realized; account #{}>"
end