Class: Eodhd::EodData

Inherits:
Object
  • Object
show all
Defined in:
lib/Eodhd/EodData.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_closeObject (readonly)

class << self



31
32
33
# File 'lib/Eodhd/EodData.rb', line 31

def adjusted_close
  @adjusted_close
end

#closeObject (readonly)

class << self



31
32
33
# File 'lib/Eodhd/EodData.rb', line 31

def close
  @close
end

#dateObject (readonly)

class << self



31
32
33
# File 'lib/Eodhd/EodData.rb', line 31

def date
  @date
end

#exchange_codeObject (readonly)

class << self



31
32
33
# File 'lib/Eodhd/EodData.rb', line 31

def exchange_code
  @exchange_code
end

#highObject (readonly)

class << self



31
32
33
# File 'lib/Eodhd/EodData.rb', line 31

def high
  @high
end

#lowObject (readonly)

class << self



31
32
33
# File 'lib/Eodhd/EodData.rb', line 31

def low
  @low
end

#openObject (readonly)

class << self



31
32
33
# File 'lib/Eodhd/EodData.rb', line 31

def open
  @open
end

#symbolObject (readonly)

class << self



31
32
33
# File 'lib/Eodhd/EodData.rb', line 31

def symbol
  @symbol
end

#volumeObject (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