class Finnhub::Crypto_Exchange

Attributes

name[R]

Public Class Methods

new(client:, name:) click to toggle source
# File lib/Crypto.rb, line 3
def initialize(client:, name:)
  @client = client
  @name = name
end

Public Instance Methods

symbol(**args) click to toggle source
# File lib/Crypto.rb, line 19
def symbol(**args)
  Finnhub::Crypto_Symbol.new(client: @client, exchange: @name, **args)
end
symbols(plain: false) click to toggle source
# File lib/Crypto.rb, line 10
def symbols(plain: false)
  output = @client.request("/crypto/symbol?exchange=#{@name}")
  return output if plain

  output.map do |o|
    Finnhub::Crypto_Symbol.new(client: @client, exchange: @name, **o)
  end
end