Internal Server Error?

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

1 Like

Getting the same error here, when trying to request 15min bar service.
https://data.alpaca.markets/v1/bars/15Min?symbols=PYPL&start=2020-06-28T00:00:01-04:00&end=2020-07-28T23:59:59-04:00

Yesterday was working fine, today I get this error.

I hope its something their end tbh, otherwise I cannot fathom how I caused this error. The support staff don’t seem fussed that they’re having an INTERNAL server error, when I raised the issue it was clear that my request wasn’t even read to the end. Do you know if there are other platforms available offering no commission Api trading?
thanks
e

I have only just started playing with the C# API today and after the first few requests I get this exception and I am only running the example script. Glad I am not the only one seeing it!

hey guys, getting the same error. Any options to work around it? Or is it purely on Alpaca’s side to deal with?

cheers

also yea its been working great right up to today. zero code chgs.

Yeah, I went back to a version that I KNEW worked and now it doesn’t. Hopefully someone from alpaca gives a s*** enough to resolve the issue - AND tell the community!

A few more people are complaining about the same issue in their Slack.

I heard about Ameritrade: https://www.tdameritrade.com/api.page
But have never tried it… might start trying it today…

The bars service is working now.

yep no longer an issue. Don’t appreciate alpaca ignoring my notifying them that they have a problem, they don’t seem to take requests very seriously

2 Likes

I am still not able to run anything. I have a separate post “Simplest Possible program will not run” I would appreciate any suggestions if you will take a look at it.

I’m not sure why this sort of thing happens, sorry mate. I commit code I KNOW works so when this sort of thing happens I can isolate the problem to alpaca’s side

Mine was running when you made your post to this thread though, 2:32pm UK time just after market open.

Without a doubt, the best platform out there is Meta Trader 5.
The same platform supports various brokers.
The downside is support for Python is limited. Their base language interface is built on C. The number of stocks and ETF’s is limited, depending on the broker you use. But if you can handle C and you can find an instrument you want to trade, it is a dream come true.

Thanks for the tip! Do they offer partial shares, is it commission free?
Thanks
E