Forums

from alpha_vantage.timeseries import TimeSeries

from the code

 #!/usr/local/bin/python2.7
 from alpha_vantage.timeseries import TimeSeries
 from pprint import pprint
 ts = TimeSeries(key='XXYUAQYRTXPK1TJL', output_format='pandas')
 data, meta_data = ts.get_intraday(symbol='MSFT',interval='1min', outputsize='compact')
 pprint(data.head(2))

I could not get the output. IOError: [Errno socket error] [Errno 1] _ssl.c:510: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error How to get the data?

That's odd -- it looks like the AlphaVantage site is returning an invalid SSL handshake. Perhaps it was a server glitch on their side? If so, it should have cleared up by now -- I can certainly access their site from a browser.

Traceback (most recent call last): File "/home/veepsirtt/vpnew1.py", line 5, in <module> data, meta_data = ts.get_intraday(symbol='MSFT',interval='1min', outputsize='compact') File "/home/veepsirtt/.local/lib/python2.7/site-packages/alpha_vantage/alphavantage.py", line 173, in _format_wrapper self, args, kwargs) File "/home/veepsirtt/.local/lib/python2.7/site-packages/alpha_vantage/alphavantage.py", line 158, in _call_wrapper return self._handle_api_call(url), data_key, meta_data_key File "/home/veepsirtt/.local/lib/python2.7/site-packages/alpha_vantage/alphavantage.py", line 74, in _retry_wrapper return func(self, args, **kwargs) File "/home/veepsirtt/.local/lib/python2.7/site-packages/alpha_vantage/alphavantage.py", line 261, in _handle_api_call response = urllib.urlopen(url) File "/usr/lib/python2.7/urllib.py", line 87, in urlopen return opener.open(url) File "/usr/lib/python2.7/urllib.py", line 208, in open return getattr(self, name)(url) File "/usr/lib/python2.7/urllib.py", line 359, in open_http return self.http_error(url, fp, errcode, errmsg, headers) File "/usr/lib/python2.7/urllib.py", line 372, in http_error result = method(url, fp, errcode, errmsg, headers) File "/usr/lib/python2.7/urllib.py", line 665, in http_error_301 return self.http_error_302(url, fp, errcode, errmsg, headers, data) File "/usr/lib/python2.7/urllib.py", line 635, in http_error_302 data) File "/usr/lib/python2.7/urllib.py", line 661, in redirect_internal return self.open(newurl) File "/usr/lib/python2.7/urllib.py", line 208, in open return getattr(self, name)(url) File "/usr/lib/python2.7/urllib.py", line 437, in open_https h.endheaders(data) File "/usr/lib/python2.7/httplib.py", line 1013, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 864, in _send_output self.send(msg) File "/usr/lib/python2.7/httplib.py", line 826, in send self.connect() File "/usr/lib/python2.7/httplib.py", line 1220, in connect self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file) File "/usr/lib/python2.7/ssl.py", line 487, in wrap_socket ciphers=ciphers) File "/usr/lib/python2.7/ssl.py", line 243, in init self.do_handshake() File "/usr/lib/python2.7/ssl.py", line 405, in do_handshake self._sslobj.do_handshake() IOError: [Errno socket error] [Errno 1] _ssl.c:510: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error

There isn't really any new information, there. Perhaps you should take it up with the authors of the library or the owners of the site you're accessing.