Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1.07 KB

README.md

File metadata and controls

47 lines (33 loc) · 1.07 KB

ruby-forex-quotes

ruby-forex-quotes is a Ruby Library for fetching realtime forex quotes

Table of Contents

Installation

gem 'forex_quotes', github: 'testdouble/ruby-forex-quotes', branch: 'main'

Usage

Instantiate the client

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.31 }

Convert a specific amount from cents to yen.

client.convert(from: 'USD', to: 'JPY', amount: 100)
# { :JPY => 14900.45 }

License and Terms

This library is provided without warranty under the MIT license.