Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

400 Error + Ticker issue #476

Open
ZonatedVoyage86 opened this issue Jun 17, 2024 · 0 comments
Open

400 Error + Ticker issue #476

ZonatedVoyage86 opened this issue Jun 17, 2024 · 0 comments

Comments

@ZonatedVoyage86
Copy link

Whenever I try and use the program I have in command (which has robin_stocks) I always have been getting this error and I dont know how to fix it

400 Client Error: Bad Request for url: https://api.robinhood.com/quotes/historicals/?symbols=INPX&interval=5minute&span=day&bounds=extended

Traceback (most recent call last):
File "C:\Users\20sha\Documents\Robin\trader.py", line 119, in
trade = ts.trade_option(stock, price)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\20sha\Documents\Robin\trade_strat.py", line 61, in trade_option
df_historical_prices = self.get_historical_prices(stock, span='day')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\20sha\Documents\Robin\trade_strat.py", line 40, in get_historical_prices
dates_times = pd.to_datetime(df.loc[:, 'begins_at'])
~~~~~~^^^^^^^^^^^^^^^^
File "c:\Users\20sha\Documents\Stonks.venv\Lib\site-packages\pandas\core\indexing.py", line 1184, in getitem
return self._getitem_tuple(key)
^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\20sha\Documents\Stonks.venv\Lib\site-packages\pandas\core\indexing.py", line 1368, in _getitem_tuple
return self._getitem_lowerdim(tup)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\20sha\Documents\Stonks.venv\Lib\site-packages\pandas\core\indexing.py", line 1065, in _getitem_lowerdim
section = self._getitem_axis(key, axis=i)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\20sha\Documents\Stonks.venv\Lib\site-packages\pandas\core\indexing.py", line 1431, in _getitem_axis
return self._get_label(key, axis=axis)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\20sha\Documents\Stonks.venv\Lib\site-packages\pandas\core\indexing.py", line 1381, in _get_label
return self.obj.xs(label, axis=axis)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\20sha\Documents\Stonks.venv\Lib\site-packages\pandas\core\generic.py", line 4287, in xs
return self[key]
~~~~^^^^^
File "c:\Users\20sha\Documents\Stonks.venv\Lib\site-packages\pandas\core\frame.py", line 4102, in getitem
indexer = self.columns.get_loc(key)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\20sha\Documents\Stonks.venv\Lib\site-packages\pandas\core\indexes\range.py", line 417, in get_loc
raise KeyError(key)
KeyError: 'begins_at'

Sorry if any of that does not help. I have been looking for a solution and haven't found one. I also get the same 4 tickers every time i run my program no matter what i do. The ticker symbols are: ['INPX', 'GNUS', 'CNET', 'OGI']. If anybody is able to help I would greatly appreciate it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant