ALPACA Bars Seconds timeframe

I want to get stock bars (fetch or stream) on seconds timeframe. Is it possible?

@jimcomccabe3 The smallest duration bars which Alpaca has are 1 minute bars. So no, it is not possible to fetch or stream 1 second bars.

Alpaca did at one time offer 1 second bars but discontinued them. Because of the random (non sequential) order which trades are received, the 1 second bars needed to be updated after at least 10 seconds and often completely changed the OHLC values for a large percentage of bars. This made the 1 second bars misleading at best and often simply unusable. This isn’t because of any technical constraint, but rather that trades are received from 25+ execution venues with various latencies and often received more than 500 ms after the actual trade. A large percentage of trades are never received until the second after they occurred (the SEC actually provides execution venues 10 seconds to report a trade during market hours). You may want to consider that when pursuing trade signals based upon 1 second bars?

So if I want to listen to a stream to real time stocks, I still cannot get the values on seconds precision right ?

@jimcomccabe3 Trades are streamed in the order they are received from the Securities Information Processors (SIPs) which isn’t necessarily the same as the order they occurred. You would need to look at the trade timestamps to put them into actual chronological order (and therefore the actual ‘second bar’ in which they belong).

but my question was if i can listen to stock bars on a seconds timeframe. is this possible?

@jimcomccabe3 Alpaca only creates minute bars (not second bars). If there are ‘valid’ trades in a minute then a bar is created within a second of the end of the bar and immediately streamed. The bar is also available then to fetch via the historical REST APIs.

One can subscribe to bars and get them streamed, but they will only be pushed once a minute (at the end of the minute bar). So no, it is not possible to fetch or stream 1 second bars.