binance-exchange/node-binance-api

market buy order throwing error in v0.3.7

adityamertia opened this issue · 5 comments

Hi,

On v0.3.7 i see below error on market order. market order has nothing to do with price?

BUY(LTCETH,0.01,0) { code: -1013, msg: 'Invalid price.' }

Thanks

Ah! I'm having the issue in 0.3.6 as well. Downgrading to 0.3.5 for the time being.

I looked through the code and determined that the issue is somewhere in lines 95-109 and 428, 429. Looks like price is being added to the data object and that is being added to the url path on the Object.keys(data) iterator. The type is 'LIMIT'and the price is 0 on the data object for marketBuy calls.

Sorry, I don't have time to fix that and make a PR at the moment, but I will gladly do that if not done in the morning.

Edit: 0.3.5 has the bug of no comma between the quantity and callback params on line 428, the marketBuy method declaration.

Yes indeed it exists on 0.3.6. I was wondering why there are so many breaking changes in last few days. Isn't there proper testing that the builds go through?

Because I have been away on business this week and the commits have been provided by the community

@jaggedsoft dude, you have been killing it, though. I was digging pretty deep into the code base and I’m thoroughly impressed with what you’ve put together. I was able to fix my problems (though they were cascading) within an hour even though my initial assessment was that it would have to take until the next day. Thanks for making is so easily parseable and maintainable!

Resolved in v0.3.8 jaggedsoft@8bf3cde