Lost about 5-10% on some gains this morning… really annoyed. Constantly running into errors - I have another thread where the buy dates are incorrect.
algo_1 | File "reversion.py", line 208, in compute_adx
algo_1 | h = data.history(security, 'high', 2 * period, '1d').dropna().values
algo_1 | File "/usr/local/lib/python3.6/site-packages/pylivetrader/data/bardata.py", line 143, in history
algo_1 | self.data_frequency,
algo_1 | File "/usr/local/lib/python3.6/site-packages/pylivetrader/data/data_portal.py", line 86, in get_history_window
algo_1 | end_dt=end_dt).swaplevel(
algo_1 | File "/usr/local/lib/python3.6/site-packages/pylivetrader/data/data_portal.py", line 62, in _get_realtime_bars
algo_1 | assets, frequency, bar_count=bar_count)
algo_1 | File "/usr/local/lib/python3.6/site-packages/pylivetrader/backend/alpaca.py", line 494, in get_bars
algo_1 | symbols, 'minute', limit=1000)
algo_1 | File "/usr/local/lib/python3.6/site-packages/pylivetrader/backend/alpaca.py", line 614, in _symbol_bars
algo_1 | return parallelize(fetch)(symbols)
algo_1 | File "/usr/local/lib/python3.6/site-packages/pylivetrader/misc/parallel_utils.py", line 39, in wrapper
algo_1 | task_result = task.result()
algo_1 | File "/usr/local/lib/python3.6/concurrent/futures/_base.py", line 425, in result
algo_1 | return self.__get_result()
algo_1 | File "/usr/local/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
algo_1 | raise self._exception
algo_1 | File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
algo_1 | result = self.fn(*self.args, **self.kwargs)
algo_1 | File "/usr/local/lib/python3.6/site-packages/pylivetrader/backend/alpaca.py", line 82, in wrapper
algo_1 | return func(*args, **kwargs)
algo_1 | File "/usr/local/lib/python3.6/site-packages/pylivetrader/backend/alpaca.py", line 577, in fetch
algo_1 | int(to.timestamp()) * 1000
algo_1 | File "/usr/local/lib/python3.6/site-packages/alpaca_trade_api/polygon/rest.py", line 135, in historic_agg_v2
algo_1 | raw = self.get(path, params, version='v2')
algo_1 | File "/usr/local/lib/python3.6/site-packages/alpaca_trade_api/polygon/rest.py", line 36, in get
algo_1 | return self._request('GET', path, params=params, version=version)
algo_1 | File "/usr/local/lib/python3.6/site-packages/alpaca_trade_api/polygon/rest.py", line 32, in _request
algo_1 | resp.raise_for_status()
algo_1 | File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 941, in raise_for_status
algo_1 | raise HTTPError(http_error_msg, response=self)
algo_1 | requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://api.polygon.io/v2/aggs/ticker/ATRC/range/1/minute/1587960901000/1588080961000?unadjusted=False&apiKey=XXX
All of my buys and sells are blocked atm