Skip to content

testdouble/ruby-forex-quotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 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

# 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.

About

Ruby Library for fetching realtime forex quotes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages