There are plenty of free data feeds, basically any exchange with a free account will offer you a lot of data for free, near real time. Some via REST calls, some via websocket. Some might also offer some daily numbers or hourly numbers going back a few months/years. A lot of that said data will be market-maker data, meaning it may diverge in time from the real exchange information.
I'm no expert but if you want REALLY up to date information with many ticks per second, you'll have to pay.
As for trading, you're either paying fees or paying by the spread (difference) between buy/sell.
There is no free lunch.
AlphaVantage has a free tier but there's a limit on request per min. https://www.alphavantage.co/documentation/
Think or Swim from TD Ameritrade is effectively free (you need an account with money in it, but you aren't charged to access it or the API). When/if you want to make trades you can as well.
I can recommend https://twelvedata.com/
IEX had a lot of free stuff but I think costs got to them and they charge a little now, you might also be able to use Alpaca
To get high quality, up to date data, expect to pay. I just moved from Quandl to Tiingo for EOD stock data.
not to hijack the thread, but does anyone know or recommend an economic calendar REST API feed?
tradier.com API is free if you keep an account there. I do this and it is handy for many things.
Alpaca API lets you trade stocks with a commission free API. They have a REST API and you can also receive data over websockets via their polygon.io integration if you have a brokerage account.
Tradier lets you trade stocks and options. Tradier option trading is commission free if you have a subscription, otherwise there is a small commission per trade. They have an API for market data over REST API and websockets.
TD Ameritrade has an API and tda-api python package makes it easier to use, but not easy to paper trade with it for testing.
You can also use an unofficial Robinhood package like robin_stocks, but Robinhood doesn't officially support any of this.
Interactive Brokers supports the most instruments, including many currencies, futures, etc, but you will pay a small monthly fee for historical and real time data, plus commissions. I recommend the ib_insync package to make their API easier to use.
Self promo: I have a YouTube channel that is focused on this topic:
https://youtube.com/c/parttimelarry