dparlevliet / node.bittrex.api

Node Bittrex API is an asynchronous node.js library for the Bittrex API, the data can be received either via GET request or Stream.
MIT License
253 stars 100 forks source link

getbalance and getbalances returns data in err #107

Open Breich90 opened 6 years ago

Breich90 commented 6 years ago

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 } }