I've been playing around with some stock broker simulators lately which inspired me to start a small project for fun for myself. It's a small website I'm going to program where I use real-time stock data to do some analytics, just for fun.
This made me wonder where for example online stock brokers get their real-time updated prices from. Take for example Plus500, each second they give an updated price of a stock price. My question is, where do brokers like Plus500 get their real-time data from? Take for example the Yahoo Finance section. How does Yahoo get all this information? Or the same for Google, if you punch in Google "AAPL Stock Price" you instantly get a graph which gets updated constantly. How do these online brokers or Google or Yahoo or other online platforms get this data from to begin with? I mean, eventually there must be some "root" source where they get this information. Would anything like that be accessible for "normal people", like me to use in my project? Right now I'm using the Yahoo Finance API but the same here, this also must have some root source in the first place. What is that source that the big websites use?