Open Breich90 opened 6 years ago
await this.bittrex.getbalances(function( data, err ) { console.warn(err: ${err.result}) console.warn(data: ${data})
await this.bittrex.getbalances(function( data, err ) { console.warn(
) console.warn(
)
Output:
err: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] data: null
Err is iterable, but I cannot extract anything from each object; so the following returns undefined:
for (var i in err.result){ if (err.result[i].Currency == symbol){ console.warn(err.result[i].Balance) return err.result[i].Balance } }
for (var i in err.result){
if (err.result[i].Currency == symbol){
console.warn(err.result[i].Balance)
return err.result[i].Balance
}
await this.bittrex.getbalances(function( data, err ) { console.warn(
err: ${err.result}) console.warn(
data: ${data})
Output:
err: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] data: null
Err is iterable, but I cannot extract anything from each object; so the following returns undefined:
for (var i in err.result){
if (err.result[i].Currency == symbol){
console.warn(err.result[i].Balance)
return err.result[i].Balance
}
}