testdouble / ruby-forex-quotes

Ruby Library for fetching realtime forex quotes.

Home Page:https://1forge.com/forex-data-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ruby-forex-quotes

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

Table of Contents

Requirements

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.

https://1forge.com/forex-data-api

License:MIT License


Languages

Language:Ruby 100.0%