Class: Eodhd::EodData
- Inherits:
-
Object
- Object
- Eodhd::EodData
- Defined in:
- lib/Eodhd/EodData.rb
Instance Attribute Summary collapse
-
#adjusted_close ⇒ Object
readonly
class << self.
-
#close ⇒ Object
readonly
class << self.
-
#date ⇒ Object
readonly
class << self.
-
#exchange_code ⇒ Object
readonly
class << self.
-
#high ⇒ Object
readonly
class << self.
-
#low ⇒ Object
readonly
class << self.
-
#open ⇒ Object
readonly
class << self.
-
#symbol ⇒ Object
readonly
class << self.
-
#volume ⇒ Object
readonly
class << self.
Class Method Summary collapse
- .all(client: nil, api_token: nil, exchange_code:, symbol:, period: 'd', from: nil, to: nil) ⇒ Object
Instance Method Summary collapse
-
#initialize(exchange_code:, symbol:, date:, open:, high:, low:, close:, adjusted_close:, volume:) ⇒ EodData
constructor
A new instance of EodData.
Constructor Details
#initialize(exchange_code:, symbol:, date:, open:, high:, low:, close:, adjusted_close:, volume:) ⇒ EodData
Returns a new instance of EodData.
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/Eodhd/EodData.rb', line 42 def initialize(exchange_code:, symbol:, date:, open:, high:, low:, close:, adjusted_close:, volume:) @exchange_code = exchange_code @symbol = symbol @date = date @open = open @high = high @low = low @close = close @adjusted_close = adjusted_close @volume = volume end |
Instance Attribute Details
#adjusted_close ⇒ Object (readonly)
class << self
31 32 33 |
# File 'lib/Eodhd/EodData.rb', line 31 def adjusted_close @adjusted_close end |
#close ⇒ Object (readonly)
class << self
31 32 33 |
# File 'lib/Eodhd/EodData.rb', line 31 def close @close end |
#date ⇒ Object (readonly)
class << self
31 32 33 |
# File 'lib/Eodhd/EodData.rb', line 31 def date @date end |
#exchange_code ⇒ Object (readonly)
class << self
31 32 33 |
# File 'lib/Eodhd/EodData.rb', line 31 def exchange_code @exchange_code end |
#high ⇒ Object (readonly)
class << self
31 32 33 |
# File 'lib/Eodhd/EodData.rb', line 31 def high @high end |
#low ⇒ Object (readonly)
class << self
31 32 33 |
# File 'lib/Eodhd/EodData.rb', line 31 def low @low end |
#open ⇒ Object (readonly)
class << self
31 32 33 |
# File 'lib/Eodhd/EodData.rb', line 31 def open @open end |
#symbol ⇒ Object (readonly)
class << self
31 32 33 |
# File 'lib/Eodhd/EodData.rb', line 31 def symbol @symbol end |
#volume ⇒ Object (readonly)
class << self
31 32 33 |
# File 'lib/Eodhd/EodData.rb', line 31 def volume @volume end |
Class Method Details
.all(client: nil, api_token: nil, exchange_code:, symbol:, period: 'd', from: nil, to: nil) ⇒ Object
7 8 9 |
# File 'lib/Eodhd/EodData.rb', line 7 def all(client: nil, api_token: nil, exchange_code:, symbol:, period: 'd', from: nil, to: nil) load(client: client, api_token: api_token, exchange_code: exchange_code, symbol: symbol, period: period, from: from, to: to) end |