class Finnhub::Stock_Exchange
Attributes
code[R]
hash[R]
Public Class Methods
new(client:, code:, hash:)
click to toggle source
# File lib/Stock.rb, line 3 def initialize(client:, code:, hash:) @client = client @hash = hash @code = code end
Public Instance Methods
symbol(**args)
click to toggle source
# File lib/Stock.rb, line 20 def symbol(**args) Finnhub::Stock.new(client: @client, exchange: @code, **args) end
symbols(plain: false)
click to toggle source
# File lib/Stock.rb, line 11 def symbols(plain: false) output = @client.request("/stock/symbol?exchange=#{@code}") return output if plain output.map do |o| Finnhub::Stock.new(client: @client, exchange: @code, **o) end end