Can not Place Order
all2pie opened this issue · comments
Issue type
- [ * ] bug
Brief description
I am placing an Exchange Limit Buy Order with having price little bit less then market price, I have balance available but it is not executing and getting this error message:
["error",10001,"Invalid order: not enough exchange balance for 0.00235071 BTCUSD at 9122.2"]
Market Price at time of placing order: 9131.3
Specified Price: 9122.1687
Specified Amount: 0.00235071
Hi @all2pie, thanks for opening an issue.
The problem here is that you're not accounting for the trading fees. Assuing that you'r fees are the standard 0.2%:
Before fees: 9122.1687 * 0.00235071 = 21.4435731848
Fees: 21.4435731848 * 0.002 = 0.00428871463
With fees = 21.4478618994
When fees are added, your total order cost is 0.0042537394
more than your available balance.