ru24.pro
News in English
Июль
2024

npm:oanda-exchange-rates | Skypack

0
OANDA Exchange Rates API client module for NodeJSThis module provides a simple wrapper around the OANDA Exchange Rates API using NodeJS. Go to the API documentation page for a full reference of all the methods. This service requires you to sign up for a trial or paying subscription to obtain an API key.InstallationUsageClass: OANDAExchangeRatesnew OANDAExchangeRates(options)client.getCurrencies([data_set], [callback])client.getRates(options, [callback])client.getRemainingQuotes([callback])TestsAuthorCopyright and LicenseRelease HistoryInstallationnpm install oanda-exchange-rates --saveUsagevar api = require('oanda-exchange-rates');var client = new api({ api_key: 'my_api_key'});client.getCurrencies('oanda', function(response) { if (response.success) { console.log('USD=', response.data['USD']); } else { console.log('error(', response.errorCode, ')', response.errorMessage); }});client.getRates('USD', function(response) { if (response.success) { console.log('daily average USD/GBP:', respon...