Can someone please tell me why /bars/latest api does not return the latest bar? See below for more details.
data.alpaca.markets/v2/stocks/TSLA/bars/latest
Returns latest bar with timestamp: 2025-08-18T19:59:00Z
data.alpaca.markets/v2/stocks/TSLA/bars?start=2025-08-18T0:00:00Z&end=&timeframe=1Min
Returns latest bar with timestamp: 2025-08-18T23:59:00Z
Thanks in advance!
@marcoj1003 You asked why you are getting different data using the stocks/TSLA/bars endpoin
t vs the stocks/TSLA/bars/latest.
The issue is they default to different feeds.
The stocks/TSLA/bars endpoint defaults to feed=sip
. The stocks/TSLA/bars/latest endpoint defaults to feed=sip
if the user has the Algo Trader Plus subscription, otherwise feed=iex
Do you have an Algo Trader Plus subscription? If not that is the issue. The stocks/TSLA/bars/latest endpoint is returning the latest bar from the IEX exchange.
It’s always a good idea to specify the feed
. The defaults can sometimes lead to confusion. If you do not have an Algo Trader Plus subscription a good choice when fetching the latest bar is to use feed=delayed_sip
. That will be full market data but simply delayed 15 minutes.