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 — js-client/README.md at master · ivan206/js-client

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
50 lines (42 loc) · 1.33 KB
/

README.md

Copy path

File metadata and controls

50 lines (42 loc) · 1.33 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

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

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.