yasinkuyu / binance-trader

đź’° Cryptocurrency Trading Bot for Binance (Experimental)
2.49k stars 825 forks source link

Running error on Windows 10 #260

Closed RB61 closed 5 years ago

RB61 commented 5 years ago

It seems to start OK, but then I get some errors

D:\work\rachid\crypto\binance-trader-master>python trader.py --symbol NPXSETH --quantity 100000 --profit 1.3 options: Namespace(amount=0, buyprice=0, commision='BNB', debug=False, decreasing=1e-08, increasing=1e-08, loop=0, mode='profit', orderid=0, prints=True, profit=1.3, quantity=100000.0, sellprice=0, stop_loss=0, symbol='NPXSETH', test_mode=False, wait_time=0.7) Auto Trading for Binance.com. @yasinkuyu Thrashformer

Started... Trading Symbol: NPXSETH Buy Quantity: 100000.00000000 Stop-Loss Amount: 0 Profit Mode Options: Preferred Profit: 1.30% Buy Price : (Bid+ --increasing 0.00000001) Sell Price: (Ask- --decreasing 0.00000001)

Get Ticker Exception: HTTPSConnectionPool(host='www.binance.com', port=443): Max retries exceeded with url: /api/v1/ticker/24hr?symbol=NPXSETH (Caused by SSLError(SSLError("bad handshake: SysCallError(10054, 'WSAECONNRESET')",),)) Exception in thread Thread-134: Traceback (most recent call last): File "C:\ProgramData\Miniconda3\lib\threading.py", line 916, in _bootstrap_inner self.run() File "C:\ProgramData\Miniconda3\lib\threading.py", line 864, in run self._target(*self._args, *self._kwargs) File "./app\Trading.py", line 417, in action self.logger.debug('price:%.8f buyprice:%.8f sellprice:%.8f bid:%.8f ask:%.8f spread:%.2f Originalsellprice:%.8f' % (lastPrice, buyPrice, profitableSellingPrice, lastBid, lastAsk, spreadPerc, profitableSellingPrice-(lastBid self.commision) )) TypeError: must be real number, not NoneType

Get Ticker Exception: HTTPSConnectionPool(host='www.binance.com', port=443): Max retries exceeded with url: /api/v1/ticker/24hr?symbol=NPXSETH (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000000348D7BD0F0>: Failed to establish a new connection: [WinError 10060] Une tentative de connexion a échoué car le parti connecté n’a pas répondu convenablement au-delà d’une certaine durée ou une connexion établie a échoué car l’hôte de connexion n’a pas répondu',)) Exception in thread Thread-135: Traceback (most recent call last): File "C:\ProgramData\Miniconda3\lib\threading.py", line 916, in _bootstrap_inner self.run() File "C:\ProgramData\Miniconda3\lib\threading.py", line 864, in run self._target(*self._args, *self._kwargs) File "./app\Trading.py", line 417, in action self.logger.debug('price:%.8f buyprice:%.8f sellprice:%.8f bid:%.8f ask:%.8f spread:%.2f Originalsellprice:%.8f' % (lastPrice, buyPrice, profitableSellingPrice, lastBid, lastAsk, spreadPerc, profitableSellingPrice-(lastBid self.commision) )) TypeError: must be real number, not NoneType

I have no clue where to start?

RB61 commented 5 years ago

I fixed it... I's just that binance has changed it's base url from www.binance.com to api.binance.com for v1. So I changed the code ... seems to work.