Class: Finnhub::Forex_Symbol

Inherits:
Object
  • Object
show all
Includes:
Analysis
Defined in:
lib/Forex.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Analysis

#pattern, #support_resistance, #technical_indicators

Constructor Details

#initialize(client:, exchange: nil, description: nil, hasWM: nil, displaySymbol: nil, symbol:) ⇒ Forex_Symbol

Returns a new instance of Forex_Symbol.



27
28
29
30
31
32
33
34
# File 'lib/Forex.rb', line 27

def initialize(client:, exchange: nil, description: nil, hasWM: nil,
  displaySymbol: nil, symbol:)
  @client = client
  @exchange = exchange
  @hashWM = hasWM
  @displaySymbol = displaySymbol
  @symbol = symbol
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



36
37
38
# File 'lib/Forex.rb', line 36

def client
  @client
end

#displaySymbolObject (readonly)

Returns the value of attribute displaySymbol.



36
37
38
# File 'lib/Forex.rb', line 36

def displaySymbol
  @displaySymbol
end

#exchangeObject (readonly)

Returns the value of attribute exchange.



36
37
38
# File 'lib/Forex.rb', line 36

def exchange
  @exchange
end

#hashWMObject (readonly)

Returns the value of attribute hashWM.



36
37
38
# File 'lib/Forex.rb', line 36

def hashWM
  @hashWM
end

#symbolObject (readonly)

Returns the value of attribute symbol.



36
37
38
# File 'lib/Forex.rb', line 36

def symbol
  @symbol
end

Instance Method Details

#timeseries(**args) ⇒ Object Also known as: candles



38
39
40
# File 'lib/Forex.rb', line 38

def timeseries(**args)
  Finnhub::Forex_Timeseries.new(client: @client, symbol: @symbol, **args)
end