Is there an API feed for Level 2 (best bid, best ask, best bid volume, best ask volume for each exchange) and Time & Sales for US stocks? I'm currently able to work with delayed data, but I will eventually need real-time data. The API feed should preferably provide a little bit of historical data as well (e.g. past 30 days). Symbol limit is not a concern, because I only need data for about 30 tickers at a time. I was looking at DTN IQFeed and Poligon.io. Do these data vendors have the data I am looking for? For DTN IQFeed, is their API any good for Level 2 and Times & Sales data? Is their Level 2 data "ready-made", or do they only provide raw trade and quote data, such that I will need to process the data on my own to get Level 2? Are there other data vendors you would recommend?
It is possible to use IB's API and program this yourself. But I'm not sure whether you would consider IB a suitable data vendor.
They only charge for data. The monthly fee depends on which exchange you want data for. But for US stock markets it would be around 4.5 USD/month.
Polygon's API for stocks (https://polygon.io/stocks) has websocket endpoints for real-time quotes and trades (see: https://polygon.io/sockets). Does Polygon's "real-time trades" websocket channel correspond to the "Time and Sales" that is commonly available on GUI trading platforms? Does Polygon's "real-time quotes" websocket channel provide sufficient data to construct a Level 2 table (as commonly available on trading platforms)?