In a world where access to real-time stock market data is paramount for making informed investment decisions, traditional stock market trackers often come with exorbitant subscription fees. These fees can place a significant financial burden on both individual investors and businesses alike. Recognizing this issue, I've created Stonks
a Stock Market Data Processing Engine
. It leverages the power of cloud-native tools like Prometheus and Grafana to provide an in-house solution for tracking stock market data, offering an innovative and cost-effective alternative to expensive commercial tracking software.
Stock market trackers are essential tools for investors, financial analysts, and traders. They provide critical information, insights, and analytics to facilitate better investment strategies and decisions. However, many of these trackers come with steep subscription costs, making them inaccessible to a broad range of potential users. The cumulative expenses of subscribing to multiple tracking services can quickly become a significant financial burden, especially for smaller investors and businesses. This creates a substantial barrier to entry for those seeking to gain a foothold in the financial markets.
-
Real-Time Data : Stonks provides users with real-time stock market data with help of a custom Prometheus Exporter, ensuring that they can make timely investment decisions.
-
Custom Dashboards : Stonks allows users to create custom dashboards using Grafana, tailoring the information they receive to their specific needs.
-
Cost-Effective : As an open-source solution, Stonks drastically reduces the cost of tracking stock market data, making it accessible to a broader user base.
-
Data Control : With an in-house solution, users have full control over their data, ensuring data security and privacy.
- Docker
- Docker-Compose
- A good internet connection
-
Install the prerequisites on your device
-
Now clone the project on all the servers using the following command :-
git clone https://github.com/yrs147/stonks
- Open project directory :-
cd stonks
-
Using an editor open the
dock.yaml
file and add the URLs of stocks you want to track inSTOCK1
andSTOCK2
underproducer1
andproducer2
(Remember that URLs should only be from "in.investing.com" due to scraping capabilities) -
Run the following command to start the project and wait for 2 min
docker-compose -f dock.yml -d up
- Then open
localhost:3000
in your browser and login to Grafana with usernameadmin
and passwordadmin
(Credentials can be changes in the settings)
- Then Go to Add Your First Data Source and choose Prometheus
- Then add
http://prometheus:9090
in thePrometheus server URL
and save it
-
Then Navigate Back to home and click on
Create Your First Dashboard
-
Click on
Add visualization
and choosePrometheus
as your data source
- Add
stock_close
in the metrics field , choosename
under labels and the stock you want to analyze as its value and click onRun queries
-
Now that you can see the stock being Tracked , click on
Apply
to save the button -
Repeat These Steps for the other stocks as well
-
Once you have your dashboard set up then select the refresh time as per your requirements
- And congrats!! you've successfully set up the project
- Adding alerting support through which users can get real time notifications on their devices through slack , email and discord
- Adding Support to track more than 2 stocks