Class: Alpaca::Trade::Api::Asset
- Inherits:
-
Object
- Object
- Alpaca::Trade::Api::Asset
- Defined in:
- lib/alpaca/trade/api/asset.rb
Instance Attribute Summary collapse
-
#asset_class ⇒ Object
readonly
Returns the value of attribute asset_class.
-
#easy_to_borrow ⇒ Object
readonly
Returns the value of attribute easy_to_borrow.
-
#exchange ⇒ Object
readonly
Returns the value of attribute exchange.
-
#fractionable ⇒ Object
readonly
Returns the value of attribute fractionable.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#marginable ⇒ Object
readonly
Returns the value of attribute marginable.
-
#shortable ⇒ Object
readonly
Returns the value of attribute shortable.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#symbol ⇒ Object
readonly
Returns the value of attribute symbol.
-
#tradable ⇒ Object
readonly
Returns the value of attribute tradable.
Instance Method Summary collapse
-
#initialize(json) ⇒ Asset
constructor
A new instance of Asset.
Constructor Details
#initialize(json) ⇒ Asset
Returns a new instance of Asset.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/alpaca/trade/api/asset.rb', line 10 def initialize(json) @id = json['id'] @asset_class = json['class'] @exchange = json['exchange'] @symbol = json['symbol'] @status = json['status'] @tradable = json['tradable'] @marginable = json['marginable'] @shortable = json['shortable'] @easy_to_borrow = json['easy_to_borrow'] @fractionable = json['fractionable'] end |
Instance Attribute Details
#asset_class ⇒ Object (readonly)
Returns the value of attribute asset_class.
7 8 9 |
# File 'lib/alpaca/trade/api/asset.rb', line 7 def asset_class @asset_class end |
#easy_to_borrow ⇒ Object (readonly)
Returns the value of attribute easy_to_borrow.
7 8 9 |
# File 'lib/alpaca/trade/api/asset.rb', line 7 def easy_to_borrow @easy_to_borrow end |
#exchange ⇒ Object (readonly)
Returns the value of attribute exchange.
7 8 9 |
# File 'lib/alpaca/trade/api/asset.rb', line 7 def exchange @exchange end |
#fractionable ⇒ Object (readonly)
Returns the value of attribute fractionable.
7 8 9 |
# File 'lib/alpaca/trade/api/asset.rb', line 7 def fractionable @fractionable end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/alpaca/trade/api/asset.rb', line 7 def id @id end |
#marginable ⇒ Object (readonly)
Returns the value of attribute marginable.
7 8 9 |
# File 'lib/alpaca/trade/api/asset.rb', line 7 def marginable @marginable end |
#shortable ⇒ Object (readonly)
Returns the value of attribute shortable.
7 8 9 |
# File 'lib/alpaca/trade/api/asset.rb', line 7 def shortable @shortable end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
7 8 9 |
# File 'lib/alpaca/trade/api/asset.rb', line 7 def status @status end |
#symbol ⇒ Object (readonly)
Returns the value of attribute symbol.
7 8 9 |
# File 'lib/alpaca/trade/api/asset.rb', line 7 def symbol @symbol end |
#tradable ⇒ Object (readonly)
Returns the value of attribute tradable.
7 8 9 |
# File 'lib/alpaca/trade/api/asset.rb', line 7 def tradable @tradable end |