403 Client Error: Forbidden for url

Hi there,

Got a 403 Client Error: Forbidden url with the below Python program:

import pandas as pd
import alpaca_trade_api as tradeapi
api = tradeapi.REST(api_version=‘v2’)
result = api.get_barset(‘AAPL’, ‘minute’, start = ‘2021-01-28’, end = ‘2021-01-28’).df
print(result)

Response: requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://data.alpaca.markets/v1/bars/minute?symbols=AAPL&start=2021-01-28&end=2021-01-28

Any idea what is causing this?

Ebel

1 Like

I intermittently get the same thing for the following url:
https://paper-api.alpaca.markets/v2/orders

I’m also looking for ideas on what could be causing this type of error.

Joel