I’m getting a 404 getting historical data. The only thing that changed about my account is that I signed up for an individual account. I tried with the new api connection for the individual account, but it says my account is not Active. Is this the case that my account is not active. How long do I have to wait?
404 Client Error: Not Found for url: https://data.alpaca.markets/v1/bars/5Min?symbols=AAPL&limit=300
I’m getting the same thing in the form of an invalid endpoint error message.
I started getting 404s for the v1/bars endpoint today. My guess is support was dropped for v1. FWIW I ended up migrating to the v2 API.
I’m having the same issue, has anyone found a fix?? I am using V2.
I got it working. For those of you working with the alpaca-trade-api-python python library, I did the following.
API_DATA_URL = “https://data.alpaca.markets/v2/stocks”
data_api = tradeapi.REST(API_KEY, API_SECRET_KEY, API_DATA_URL)
dataRaw = data_api.get_bars(ticker, tradeapi.TimeFrame(5, tradeapi.TimeFrameUnit.Minute), todayDate, todayDate, adjustment=‘raw’).df
Thanks! The key is the use the new function:
The old function is depricated and still calls V1 API in the latest version of the alpaca python client. This function will return an error from a v1 URL: