Access key verification failed. Unauthorized URL

These logs are over the last day or two; around 1.4M.

These seem to be the recurrent theme:

quantrocket.blotter: ERROR alpaca_trade_api.rest.APIError: access key verification failed : internal server error occurred (Code = 50010000)
quantrocket.blotter: ERROR requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://paper-api.alpaca.markets/v2/orders?limit=500&status=open

UPDATE: Sifting through logs, found old paper accounts I've purged from the DB's. Working to find a reason why/how they're still hanging. LatestBalances have all been reconciled to zero, but account names persist.


For anyone else, I had to manually remove these hanging accounts in alpaca.json then the errors went away:

$ cd ~/quantrocket
$ docker-compose exec license-service bash
$ cd /etc/opt/quantrocket
$ ls
alpaca.json ibg1.json ...