Skip to content

davidwieler/Currency

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Currency

How to

  • Clone this repo
  • cd into directory, and run npm install

API URL

URL localhost:8888/api/0.1/ if running locally, or example.com:8888/api/0.1 if hosted.

How to use the API

POST JSON to the above URL:

{ "base": "CAD", "amount": 10, "symbol": ["USD", "EUR"] }

or

{ "base": "USD", "amount": 10, "symbol": "EUR" }

or to get historical data

{ "base": "CAD", "amount": 10, "symbol": ["USD", "EUR"], "date": "1985-03-15" }

Details

  • "base" is the currency you wish to convert from. REQUIRED
  • "amount" is the amount to convert. REQUIRED
  • "symbol" is a string or array containing the currencies you wish to convert to. REQUIRED
  • "date" is the date you wish to require about. Leave blank for latest rates. OPTIONAL

Note

https://api.fixer.io/ seems to have an issue with dates before the year 2000.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published