Noob: Getting 500 when calling Polygon API

Found a simple Python tutorial and gave it a spin:

import alpaca_trade_api as tradeapi

api = tradeapi.REST(‘key1’,‘key2’)

aapl_daily = api.polygon.historic_agg(‘day’,‘AAPL’,limit=1000).df

I am getting this error:

500 Server ERror: Internal Server Error for url:

Any ideas as to why? Or any better updated tutorials for a noob just getting into this?

Thanks so much for any help!


The “500 Server ERor” is an internal web server issue. Maybe you just happened to run it when the server was having issues. Did you try it again? What is the link to the tutorial?

I’ll have to get the link when I am home, but I have tried it over multiple days in multiple different environments. I did read somewhere that you had to have an alpaca live account and I have had that funded for a while.


Well tried again this morning and now everything is working. Thank you for the help!