Alpaca / Polygon Api 404 client error: Not Found for url ***

Last couple of days my code was working fine. Getting this error from last night. Need Help!!

/root/.zipline/data/dailycache/polygon_company.pkl: digest mismatch 011fa134da7482b822cd623219795f0b != 0bb21a5c8a9a7bcc0b5134dfb17a43db, reloading
Traceback (most recent call last):
  File "algo-overnight-pipe-rank.py", line 408, in <module>
    run_live(api)
  File "algo-overnight-pipe-rank.py", line 333, in run_live
    early_rating = get_ratings(api, None)
  File "algo-overnight-pipe-rank.py", line 110, in get_ratings
    df = make_pipeline()
  File "algo-overnight-pipe-rank.py", line 101, in make_pipeline
    df = eng.run_pipeline(pipe)
  File "/usr/local/lib/python3.6/dist-packages/pipeline_live/engine.py", line 77, in run_pipeline
    initial_workspace,
  File "/usr/local/lib/python3.6/dist-packages/pipeline_live/engine.py", line 244, in compute_chunk
    to_load, mask_dates, symbols, mask,
  File "/usr/local/lib/python3.6/dist-packages/pipeline_live/data/polygon/fundamentals_loader.py", line 12, in load_adjusted_array
    company = polygon.company()
  File "/usr/local/lib/python3.6/dist-packages/pipeline_live/data/sources/polygon.py", line 17, in company
    return _company(all_symbols)
  File "/usr/local/lib/python3.6/dist-packages/pipeline_live/data/sources/util.py", line 68, in wrapper
    body = func(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/pipeline_live/data/sources/polygon.py", line 32, in _company
    return parallelize(fetch, workers=25, splitlen=50)(all_symbols)
  File "/usr/local/lib/python3.6/dist-packages/pipeline_live/data/sources/util.py", line 30, in wrapper
    task_result = task.result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/dist-packages/pipeline_live/data/sources/polygon.py", line 27, in fetch
    response = api.polygon.get('/meta/symbols/company', params=params)
  File "/usr/local/lib/python3.6/dist-packages/alpaca_trade_api/polygon/rest.py", line 36, in get
    return self._request('GET', path, params=params, version=version)
  File "/usr/local/lib/python3.6/dist-packages/alpaca_trade_api/polygon/rest.py", line 32, in _request
    resp.raise_for_status()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 935, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.polygon.io/v1/meta/symbols/company?symbols=ITCI%2CAVUV%2CMUX%2CALTG%2CVSLR%2CEVBN%2CBIB%2CIMXI%2CHYIH%2CLSACU%2CMYOV%2CAGI%2CKO%2CIWP%2CHTAB%2CMOG.A%2CISCF%2CSJM%2CEC%2CHE%2CHMY%2CGGAL%2CDLHC%2CBEAT%2CTCF%2CJETS%2CCNA%2CMSN%2CRWLS%2CTDV%2CIBDM%2CIPGP%2CFFTY%2CAEYE%2CMNSB%2CSAP%2CVRTU%2CAUY%2CHUD%2CHAP%2CXIN%2CTRTY%2CSCHL%2CTLI%2CFTSL%2CFET%2CPBYI%2CMIK%2CINVA%2CCLDX&apiKey=********************
1 Like

I get the same error but with the api.polygon.historic_agg API. One day it works and then all of the sudden it doesn’t. I can’t seem to find any documentation on what might have changed. If you hit https://https://api.polygon.io/ however you get a maintenance page but that page has been up there for days.

I see. So I’m not the only one who is having issues related to Polygon. I use pipeline_live.
I have removed from pipeline_live.data.polygon.fundamentals import PolygonCompany and using alpaca api for the data. Not calling polygon api directly for any reason. So It’s working well now. I just have to find a better solution to get company fundamentals quickly.

Same here:
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.polygon.io/v1/historic/agg/day/AAPL?limit=1000&apiKey=yourkeyhere