GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ivan206/js-client: JavaScript client for the jsonrates.com API

BranchesTags
Open more actions menu

Latest commit

 

History

18 Commits
18 Commits

Folders and files

NameName
Last commit message
Last commit date
build
build
 
 
src
src
 
 
test
test
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
README.md
README.md
 
 
jsonrates.min.js
jsonrates.min.js
 
 

Repository files navigation

JavaScript client for jsonrates.com

Real-time and reliable exchange rates for over 170 currencies.
Different endpoints to interact are available through a simple and fast JSON API.

Website: jsonrates.com

Installation

Download the file jsonrates.min.js and include it in your website:

<script src="jsonrates.min.js"></script>

Set your API key before first usage:

JR.apikey('YOUR-API-KEY');

Usage examples

/* Get the current exchange rate
   from Euro to US Dollar */
JR.from('EUR').to('USD').get(function(result) {
    console.log('Exchange rate is: ' + result.rate);
});

/* Convert 2.5 Pound Sterling
   to all available currencies */
JR.base('GBP').amount(2.5).convert(function(result) {
    console.log('Converted amounts are: ' + result.amounts);
});

/* Get the historical exchange rates
   for 3 days in January 2015 */
JR.from('USD').to('CHF').dateStart('2015-01-01').dateEnd('2015-01-03').historical(function(result) {
    console.log('Historical rates are: ' + result.rates);
});

/* Get the current exchange rate
   from the locale de_DE to en_US */
JR.from('de_DE').to('en_US').locale(function(result) {
    console.log('Exchange rate is: ' + result.rate);
});

API Documentation

See: jsonrates.com/docs

About

JavaScript client for the jsonrates.com API

jsonrates.com

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

6 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.