How to instantiate?
nodesocket opened this issue · comments
Justin Keller commented
The README.md shows:
rh = Robinhood(credentials);
Though seems like it should be:
Robinhood(credentials, function(error, broker) {
if(error) {
return callback(error);
}
callback(null, broker);
});
What is recommended?
Dustin Moore commented
Waiting for login worked for me.
var Robinhood = require('robinhood');
// Initialize
var trader = Robinhood(
{
username: 'user',
password: 'password'
},
function() {
trader.quote_data('GOOG', function(err, httpResponse, body){
if (err) {
console.error(err);
return;
}
console.log('Quote data:', body);
});
}
);
Alejandro U. Alvarez commented
published v0.1.0 that should fix this