403 Client Error for get_bars

I got 403 error on access to market data today, for both v1 and v2 endpoints, on my paper trade account.

I ran the get_barset on v1 endpoint (https://data.alpaca.markets/v1/bars/minute?symbols=AAPL&limit=10) and the get_bars on v2 endpoint (https://data.alpaca.markets/v2/stocks/AAPL/bars?timeframe=1Min&adjustment=raw&start=2021-05-13T15%3A10%3A00-04%3A00&end=2021-05-13T15%3A20%3A00-04%3A00&limit=10). Both returned 403 error.

Other account access API calls worked fine, but the account balance seems not consistent with what I see on my dashboard (I have reset my paper trade balance). I have Unlimited plan. What have caused this error?

If you have recently reset your paper trading account, ensure you create keys for the new reset account and use those new keys. Resetting a paper account actually creates a whole new account. The old account still exists but it is in a deactivated state. It often appears the old keys work because they still fetch the old account balances etc. This would seem to be the case since you state the other account API calls return numbers inconsistent with the dashboard.

1 Like

Thanks! I think that explains why.