ruby-forex-quotes
ruby-forex-quotes is a Ruby Library for fetching realtime forex quotes
Table of Contents
Requirements
- An API key which you can obtain for free at http://1forge.com/forex-data-api
Installation
gem 'forex_quotes', github: 'testdouble/ruby-forex-quotes', branch: 'main'
Usage
Instantiate the client
# You can get an API key for free at 1forge.com
client = ForexDataClient.new('YOUR_API_KEY')
Get the rate to convert from one currency to another
client.get_rate(from: 'USD', to: 'JPY')
# { :JPY => 1049 }
Convert a specific amount from cents to yen.
client.convert(from: 'USD', to: 'JPY', amount: 100)
# { :JPY => 14900 }
License and Terms
This library is provided without warranty under the MIT license.