项目作者: jodacame

项目描述 :
Is a simple module that provides exchange rates from https://apiseeds.com/ directly into your js file in JSON format.
高级语言: JavaScript
项目地址: git://github.com/jodacame/apiseeds-exchange-rate.git
创建时间: 2018-02-11T15:03:31Z
项目社区:https://github.com/jodacame/apiseeds-exchange-rate

开源协议:MIT License

下载


Apiseeds | Exchange Rate

Is a simple module that provides exchange rates from https://apiseeds.com/ directly into your js file in JSON format.

Requeriments

Installation

  1. # Local installation
  2. npm install -s apiseeds-exchange-rate
  3. # Global installation
  4. npm install -g apiseeds-exchange-rate

Method

convert

Params

  • apikey (String) [Required]
  • from (String) [Required] Check currencies method
  • to (String) [Required] Check currencies method
  • callback (response,headers) (Function) [Required]
  • amount (Number) [Optional]

Example Convert

  1. 'use strict';
  2. var exchange = require("apiseeds-exchange-rate");
  3. const apikey = 'YOUR-API-KEY'; // Get it here => https://apiseeds.com/
  4. exchange.convert(apikey,"BTC","USD",function(response,headers){
  5. console.log("Header", headers);
  6. console.log("Response",response);
  7. });

Method

currencies

Return supported currencies

Params

  • apikey (String) [Required]

Example currencies

  1. 'use strict';
  2. var exchange = require("apiseeds-exchange-rate");
  3. const apikey = 'YOUR-API-KEY'; // Get it here => https://apiseeds.com/
  4. exchange.currencies(apikey,function(response,headers){
  5. console.log("Header", headers);
  6. console.log("Response",response);
  7. });

Important

Rate limit and credits are in the header response

Api Documentation

https://apiseeds.com/documentation/exchangerates