I am having a strange problem. I haven’t changed my code, but I’m now running into the below error. I wrote Alpaca and they claim they are not having any unscheduled maintenance. They haven’t been helpful, to be honest. I would like to understand what’s going on so I can fix it, thanks for the assistance in advance. Code below:
BACKGROUND
I’m using the “getbars” function, it says the error is on this line, more code available on request, thanks guys.
Traceback (most recent call last):
File “/Users/elliot/opt/anaconda3/lib/python3.7/site-packages/alpaca_trade_api/rest.py”, line 136, in _one_request
resp.raise_for_status()
File “/Users/elliot/opt/anaconda3/lib/python3.7/site-packages/requests/models.py”, line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://data.alpaca.markets/v1/bars/minute?symbols=TSLA&limit=200
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “myFile.py”, line 39, in
tslaBars = getBars(‘TSLA’, ‘minute’)
File “myFile.py”, line 18, in getBars
barest = api.get_barset(symbol, interval, limit=LOOK_BACK_PERIOD)
File “/Users/elliot/opt/anaconda3/lib/python3.7/site-packages/alpaca_trade_api/rest.py”, line 359, in get_barset
resp = self.data_get(’/bars/{}’.format(timeframe), params)
File “/Users/elliot/opt/anaconda3/lib/python3.7/site-packages/alpaca_trade_api/rest.py”, line 166, in data_get
‘GET’, path, data, base_url=base_url, api_version=‘v1’
File “/Users/elliot/opt/anaconda3/lib/python3.7/site-packages/alpaca_trade_api/rest.py”, line 115, in _request
return self._one_request(method, url, opts, retry)
File “/Users/elliot/opt/anaconda3/lib/python3.7/site-packages/alpaca_trade_api/rest.py”, line 144, in _one_request
raise APIError(error, http_error)
alpaca_trade_api.rest.APIError: internal server error occurred