Module: IEX::Endpoints::FX
- Included in:
- Api::Client
- Defined in:
- lib/iex/endpoints/fx.rb
Instance Method Summary collapse
Instance Method Details
#fx_latest(symbols, options = {}) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/iex/endpoints/fx.rb', line 4 def fx_latest(symbols, = {}) symbols = Array(symbols) response = get('fx/latest', { token: publishable_token, symbols: symbols.join(',') }.merge()) response.map { |row| IEX::Resources::CurrencyRate.new(row) } rescue Faraday::ResourceNotFound => e raise IEX::Errors::InvalidSymbolsList.new(symbols, e.response[:body]) end |