When I run my program with my home’s wifi and my own pc its not running and gives ReadTimeOut error but when I use another wifi and my own pc it works fine and I guess I have ip banned is there a way to solve this what can I do ?
The server will returned a HTTP status code of 429 when you have an IP ban. Ensure that this is the status code that you received from the server.
I’ve checked it as you say and it gives 200 in another program that I made than what can be the reason of readTimeOut error
Hey @BerkeErtep, for the program giving “ReadTimeOut”, what’s exactly the request in url and the received error code and message?
This topic can be helpful to understand the different status code at Binance:
https://dev.binance.vision/t/how-to-deal-with-http-status-code-at-binance-api/712/2
there isn’t any status code exactly
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1371, in getresponse
response.begin()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 319, in begin
version, status, reason = self._read_status()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 280, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py", line 704, in readinto
return self._sock.recv_into(b)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/util/retry.py", line 532, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/packages/six.py", line 770, in reraise
raise value
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 447, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 336, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='fapi.binance.com', port=443): Read timed out. (read timeout=10)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/process.py", line 243, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/process.py", line 202, in _process_chunk
return [fn(*args) for args in chunk]
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/process.py", line 202, in <listcomp>
return [fn(*args) for args in chunk]
File "/Users/doganalisan/Desktop/grafik_okuma/orders.py", line 18, in takeInfo
trades = client.futures_aggregate_trades(symbol=symbol,fromid=a)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/binance/client.py", line 5142, in futures_aggregate_trades
return self._request_futures_api('get', 'aggTrades', data=params)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/binance/client.py", line 339, in _request_futures_api
return self._request(method, uri, signed, True, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/binance/client.py", line 314, in _request
self.response = getattr(self.session, method)(uri, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='fapi.binance.com', port=443): Read timed out. (read timeout=10)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/doganalisan/Desktop/grafik_okuma/orders.py", line 60, in <module>
for result in results:
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/process.py", line 559, in _chain_from_iterable_of_lists
for element in iterable:
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/_base.py", line 608, in result_iterator
yield fs.pop().result()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/_base.py", line 445, in result
return self.__get_result()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/_base.py", line 390, in __get_result
raise self._exception
requests.exceptions.ReadTimeout: None: None
It may be due to your network. Binance’s server will respond with an error code instead of ignoring your request if you are banned. Take a look on how time out is defined, maybe you can try removing the timeout parameter when you post a request. Quickstart — Requests 2.26.0 documentation
I’m using python-binance modulee for my app but I don’t think the problem is because of requests it should be my wifi because same app works on different wifi but how can I found what’s wrong with my wifi