yasinkuyu / binance-trader

💰 Cryptocurrency Trading Bot for Binance (Experimental)
2.51k stars 826 forks source link

Fix #156 #165

Closed kfiresmith closed 6 years ago

kfiresmith commented 6 years ago

Fix https://github.com/yasinkuyu/binance-trader/issues/156: Users get a traceback that looks like this:


Buy order partially filled... Wait 1 more second...
Order still partially filled...
Traceback (most recent call last):
  File "trader.py", line 46, in <module>
    t.run()
  File "./app/Trading.py", line 494, in run
    self.action(symbol)
  File "./app/Trading.py", line 378, in action
    self.sell(symbol, quantity, self.order_id, profitableSellingPrice, lastPrice)
  File "./app/Trading.py", line 110, in sell
    quantity = self.check_partial_order(symbol, orderId, sell_price)
  File "./app/Trading.py", line 281, in check_partial_order
    if self.min_notional > quantity * sell_price:
NameError: global name 'sell_price' is not defined```
kfiresmith commented 6 years ago

Nevermind, someone else already had a PR for this. https://github.com/yasinkuyu/binance-trader/pull/164