Class: Alpaca::Trade::Api::LastTrade

Inherits:
Object
  • Object
show all
Defined in:
lib/alpaca/trade/api/last_trade.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ LastTrade

Returns a new instance of LastTrade.



7
8
9
10
11
# File 'lib/alpaca/trade/api/last_trade.rb', line 7

def initialize(json)
  @status = json['status']
  @symbol = json['symbol']
  @last = json['last']
end

Instance Attribute Details

#lastObject (readonly)

Returns the value of attribute last.



5
6
7
# File 'lib/alpaca/trade/api/last_trade.rb', line 5

def last
  @last
end

#statusObject (readonly)

Returns the value of attribute status.



5
6
7
# File 'lib/alpaca/trade/api/last_trade.rb', line 5

def status
  @status
end

#symbolObject (readonly)

Returns the value of attribute symbol.



5
6
7
# File 'lib/alpaca/trade/api/last_trade.rb', line 5

def symbol
  @symbol
end