Post
Topic
Board Service Discussion
Re: accessing coinbase API using node.js
by
Joel_Jantsen
on 07/05/2017, 10:56:07 UTC
Try the following code and let me know if that works.I don't really want to run the app locally so it will be better if you add on skype or something,much better to solve in real time.
Code:
client.getAccounts({}, function(err, accounts) {
  accounts.forEach(function(acct) {
    console.log(acct.name + ': ' + acct.balance.amount + ' ' + acct.balance.currency);
    acct.getTransactions(null, function(err, txns) {
      txns.forEach(function(txn) {
        console.log('txn: ' + txn.id);
      });
    });
  });
});

Yes that API keys should be passed a string only.