SSL error

shubham edited October 2017 in Python client
Python script runs for few minutes and gives this error :

Traceback (most recent call last):

File "", line 1, in
runfile('C:/Users/Shubham/', wdir='C:/Users/Shubham')

File "C:\Users\Shubham\Anaconda3\lib\site-packages\spyder\utils\site\", line 710, in runfile
execfile(filename, namespace)

File "C:\Users\Shubham\Anaconda3\lib\site-packages\spyder\utils\site\", line 101, in execfile
exec(compile(, filename, 'exec'), namespace)

File "C:/Users/Shubham/", line 224, in

File "C:/Users/Shubham/", line 97, in strategy
tick = tickdata()

File "C:/Users/Shubham/", line 16, in tickdata
r = requests.get('')

File "C:\Users\Shubham\Anaconda3\lib\site-packages\requests\", line 72, in get
return request('get', url, params=params, **kwargs)

File "C:\Users\Shubham\Anaconda3\lib\site-packages\requests\", line 58, in request
return session.request(method=method, url=url, **kwargs)

File "C:\Users\Shubham\Anaconda3\lib\site-packages\requests\", line 508, in request
resp = self.send(prep, **send_kwargs)

File "C:\Users\Shubham\Anaconda3\lib\site-packages\requests\", line 618, in send
r = adapter.send(request, **kwargs)

File "C:\Users\Shubham\Anaconda3\lib\site-packages\requests\", line 506, in send
raise SSLError(e, request=request)

SSLError: HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: /instruments/NSE/RELCAPITAL?api_key=vpnp4jb4qq36filo&access_token=abcdefghijklmnopqrstuvwxyz (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),))
  • tonystark
    Hi @shubham,

    It looks like you are getting rate limited. If you make more than 3 requests per second you will HTTP 429 status response. Can you check the status code of the responses?
  • shubham
    i am asking for data for every 1 sec by using time.sleep()
    so i think its something else
  • cisk
    Even I'm facing this issue. I've observed the issue to be common during 3-3.30pm. Attaching logs
Sign In or Register to comment.