Class: IB::Messages::Incoming::PortfolioValue
- Defined in:
- lib/ib/messages/incoming/portfolio_value.rb
Instance Method Summary collapse
Instance Method Details
#contract ⇒ Object
25 26 27 |
# File 'lib/ib/messages/incoming/portfolio_value.rb', line 25 def contract @contract = IB::Contract.build @data[:contract] end |
#to_human ⇒ Object
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 #{account_name}>" end |