BinanceArbitrageBot
BinanceArbitrageBot copied to clipboard
api connection errors
hello, I get the following api errors when trying to start the bot, and I have entered my api key and secret into arbitrageBot.py:
File "C:\Users\zcm311\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "C:\Users\zcm311\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\util\connection.py", line 83, in create_connection
raise err
File "C:\Users\zcm311\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\zcm311\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen
chunked=chunked)
File "C:\Users\zcm311\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "C:\Users\zcm311\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 850, in _validate_conn
conn.connect()
File "C:\Users\zcm311\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connection.py", line 284, in connect
conn = self._new_conn()
File "C:\Users\zcm311\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x00000000036ABD30>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\zcm311\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\adapters.py", line 440, in send
timeout=timeout
File "C:\Users\zcm311\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "C:\Users\zcm311\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\util\retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.binance.com', port=443): Max retries exceeded with url: /api/v1/exchangeInfo (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000000036ABD30>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\zcm311\BinanceArbitrageBot\tempCodeRunnerFile.py", line 11, in <module>
binance.initializeLotInfo()
File "c:\zcm311\BinanceArbitrageBot\binance.py", line 272, in initializeLotInfo
raw = lotInfo('abc')['symbols']
File "c:\zcm311\BinanceArbitrageBot\binance.py", line 266, in lotInfo
data = request("GET", "/api/v1/exchangeInfo", {})
File "c:\zcm311\BinanceArbitrageBot\binance.py", line 230, in request
resp = requests.request(method, ENDPOINT + path, params=params)
File "C:\Users\zcm311\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\zcm311\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\zcm311\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "C:\Users\zcm311\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.binance.com', port=443): Max retries exceeded with url: /api/v1/exchangeInfo (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000000036ABD30>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))
Looks like there may be an issue with your configuration since you're not getting any response from Binance. Have you made sure that your IP address has permission to use the API you created?