0

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);
});
wowkin2
  • 5,895
  • 5
  • 23
  • 66
Krunal Limbad
  • 1,533
  • 1
  • 12
  • 23

1 Answers1

1

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.

Krunal Limbad
  • 1,533
  • 1
  • 12
  • 23