Skip to content

testdouble/ruby-forex-quotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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. Note this expects cents not dollars

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.

About

Ruby Library for fetching realtime forex quotes.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages