A real-time stock market monitoring dashboard that displays live prices for equity stocks and market indices with 1-second refresh intervals(which you can customize) when the market is open.
- 📈 Real-time stock price updates (1-second refresh when market is open)
- 📊 Support for both equity stocks and market indices
- ➕ Easy stock addition through a simple interface
- 🔄 Auto-updating market status
- 🌐 Data sourced from MoneyControl API
- Clone the repository
git clone <repository-url>
cd <repository-name>- Verify folder structure
equity/- Contains equity stock filesindices/- Contains market indices filesindex.php- Main dashboard file
- Start the application
- Open
index.phpin your browser with an active internet connection - The dashboard will display:
- Current market status
- Index stocks
- Equity stocks
- Prices update every 1 second when the market is open
- Open
-
Open the add stock interface
- Click the "Add New Stock" button on the main dashboard
- A new window will load with a form
-
Fill in stock details
- Enter the required stock information
- Click the "Generate" button
-
Integrate the generated code
- After clicking "Generate", you'll be redirected to
index.php - The code will be automatically copied to your clipboard
- After clicking "Generate", you'll be redirected to
-
Paste the code in appropriate file
- Open the respective folder (
equity/orindices/) - Open
equity.phporindices.php - Paste the code at the bottom, before the closing
</script>tag
- Open the respective folder (
-
Add the setInterval function
- Open the other PHP file in the respective folder
- Add a
setIntervalfunction to call your new stock function - Or copy-paste an existing line and change the function name
-
Save and refresh
- Save all modified files
- Refresh or reopen
index.php - Your new stock will appear in the respective section (Index or Equity)
To add a new stock, you need to find its MoneyControl API endpoint:
-
Search the stock on MoneyControl
- Go to MoneyControl
- Search for your desired stock (e.g., "HUL")
-
Open Developer Tools
- After the page loads, press
F12or right-click and select "Inspect" - Navigate to the Network tab
- After the page loads, press
-
Find the API endpoint
- The stock page URL will look like:
https://www.moneycontrol.com/india/stockpricequote/personal-care/hindustanunilever/HU
- In the Network tab, search for the last parameter (e.g., "HU")
- Filter the results to find the API call
- Look for a file named
huorhl
- Copy the API URL
- Right-click on the API call
- Copy the full request URL
- Use this URL in the API field when adding the stock
For Hindustan Unilever (HUL):
- Stock URL:
https://www.moneycontrol.com/india/stockpricequote/personal-care/hindustanunilever/HU - Search in Network tab: "HU"
- Find: API file
huor similar - Copy: The complete API URL from the request
- PHP server (Apache/Nginx)
- Active internet connection
- Modern web browser with JavaScript enabled
project-root/
│
├── index.php # Main dashboard file
├── equity/
│ ├── equity.php # Equity stocks handler
│ └── [other files]
├── indices/
│ ├── indices.php # Indices handler
│ └── [other files]
└── README.md
- Ensure you have an active internet connection for real-time data
- The dashboard updates every 1 second when the market is open
- All new stock code should be added before the closing
</script>tag - API endpoints are sourced from MoneyControl
- This is just for education purposes only the owner of the repo. is not taking any responsibilities if you misuse it.