Skip to content

alpaca_trade_api.rest.APIError: account not found for 97b24XXXXXXXXXXXX #25

@wwwguy

Description

@wwwguy

I'm new to alpacha and am just trying to test this out... getting the following error:

Traceback (most recent call last):
  File "C:\Users\XXXX\AppData\Local\Programs\Python\Python38\lib\site-packages\alpaca_trade_api\rest.py", line 140, in _one_request
    resp.raise_for_status()
  File "C:\Users\XXXX\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://paper-api.alpaca.markets/v2/account

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "algo.py", line 399, in <module>
    run(get_tickers(), market_open, market_close)
  File "algo.py", line 92, in run
    portfolio_value = float(api.get_account().portfolio_value)
  File "C:\Users\XXXX\AppData\Local\Programs\Python\Python38\lib\site-packages\alpaca_trade_api\rest.py", line 178, in get_account
    resp = self.get('/account')
  File "C:\Users\XXXX\AppData\Local\Programs\Python\Python38\lib\site-packages\alpaca_trade_api\rest.py", line 156, in get
    return self._request('GET', path, data)
  File "C:\Users\XXXX\AppData\Local\Programs\Python\Python38\lib\site-packages\alpaca_trade_api\rest.py", line 119, in _request
    return self._one_request(method, url, opts, retry)
  File "C:\Users\XXXX\AppData\Local\Programs\Python\Python38\lib\site-packages\alpaca_trade_api\rest.py", line 148, in _one_request
    raise APIError(error, http_error)
alpaca_trade_api.rest.APIError: account not found for 97b24XXXXXXXXXXXX

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions