0

I am using Alpha Vantage API and python. I was able to successfully install alpha vantage on my machine. Unfortunately I am working in a corporate environment where I have to define a proxy. So this line of code works perfectly fine for me:

from alpha_vantage.timeseries import TimesSeries

But this line of code doesn't work:

data, meta_data = ts.get_intraday('GOOGL')

Last error message from error log is:

URLError: <urlopen error [WinError 10061] No connection could be made because the target machine actively refused it>

I think I have to define the proxy (with credentials) but I don't know where and how for Alpha Vantage API.

jww
  • 97,681
  • 90
  • 411
  • 885
clex
  • 465
  • 2
  • 7
  • 19

1 Answers1

1

You can specify proxies using

proxies = {
    'http': 'http://user:pass@10.10.1.0:3128',
    'https': 'http://user:pass@10.10.1.0:3128',
}

ts = TimeSeries(key='your_key')

ts.set_proxy(proxies)
Buggy
  • 3,539
  • 1
  • 21
  • 38