The API streams ticks in the following format every second:
Timestamp, Last traded Price, Best buy price, Best buy quantity, Best sell price, Best sell quantity
To run the api on your local machine, download this python file, and run the server on the terminal using:
Now you should be able to connect to it over the address displayed in your app. Enter a hello message and you will start receiving price ticks per second.
It will type out the port on which it is running, and then you can connect to it using that port. The API is TCP based in nature, and generates snapshots of the stock exchange every second. We require you to generate the stock ticker graph based on last traded price and execute orders based on the data available in those snapshots for best buying and best selling prices.
PS: The stock_price_server generates random price ticks and the data is arbitrary. Its only purpose is to help you simulate orders and generate the price graph.