You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 20, 2020. It is now read-only.
You're using the callback signature. Like every callback in node, the first argument is always the error. The current GDAX callback signature passes 3 arguments to the callback function (err, response, and data). You're incorrectly assuming that only data is passed, and because there's no error, you're merely logging the null error argument.
Your code should instead read:
publicClient.getProductTrades('BTC-USD',function(err,response,trades){console.log(trades);});// OR, more idiomatically:publicClient.getProductTrades('BTC-USD',(err,response,trades)=>console.log(trades))
Hi,
Looks as though this is not returning results.
const Gdax = require('gdax');
const publicClient = new Gdax.PublicClient();
publicClient.getProductTrades('BTC-USD', function(trades) {
console.log(trades);
});
The text was updated successfully, but these errors were encountered: