I get a 403 : requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://data.alpaca.markets/v1/last_quote/stocks/AAPL
Using alpaca_trade_api 0.51 . I could swear this was working last week. I get the 403 using paper APCA_API_{KEY_ID, SECRET_KEY}, works with live credentials.
import alpaca_trade_api as tradeapi
api = tradeapi.REST(os.environ[‘APCA_API_KEY_ID’], os.environ[‘APCA_API_SECRET_KEY’],
base_url=‘https://paper-api.alpaca.markets’)
print(api.get_account()) # works
print(api.get_last_quote(‘AAPL’)) # raises exception
Have I missed something?
Thanks.