Ad

Polling Error Using Coinpayments In Node.js

Code works fine, but when executed after few seconds it starts consoling error message 'Polling error'.

I tried searching the term but nothing came up,

Any help is appreciated.

var Coinpayments = require('coinpayments');
var options = {
  key: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
  secret: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  autoIpn: 'true',
  ipnTime: 'false'
}
var client = new Coinpayments(options);

client.getBasicInfo(function (error, result) {
  error ? console.log(error) :
    console.log(result);
});

client.createTransaction({ 'currency1': 'USD', 'currency2': 'LTCT', 'amount': 1 }, function (error, result) {
  error ? console.log(error) : console.log(result);
});
Ad

Answer

Solved, issue was I needed to give all permission to API used in CoinPayments.

The operation I was using which needed some permission from API

which they didn't mentioned in error message.

Ad
source: stackoverflow.com
Ad