Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NSE Symbols - Automated Derivatives List

GitHub release GitHub last commit GitHub workflow status

This repository automatically fetches the latest derivatives symbols from NSE (National Stock Exchange of India), generates CSV and TradingView-ready text files, and uploads them to GitHub Releases.

The workflow is fully automated and runs monthly, while also supporting manual execution.


📌 Features

  • Fetches all NSE derivatives symbols from the official NSE API.
  • Generates two output files:
    • derivatives_symbols({count}).csv → CSV with Sr. No. and Symbol
    • tradingview_symbols({count}).txt → Text file for TradingView import with NSE:SYMBOL format
  • Automatically sorts symbols alphabetically.
  • Automatically deletes previous GitHub release before creating a new one.
  • Fully automated via GitHub Actions:
    • Runs manually via workflow_dispatch
    • Runs on the 1st day of every month
  • Ready for TradingView import to watchlists.

🗂 Repository Structure

F-O-Stocks-list/
├─ index.js                  # Main script to fetch symbols and generate files
├─ package.json              # Node.js dependencies
├─ package-lock.json
├─ .github/
│  └─ workflows/
│      └─ release.yml        # GitHub Actions workflow
└─ README.md

⚡ Prerequisites

  • Node.js v20+
  • NPM
  • GitHub repository with GH_PAT (Personal Access Token) stored in Secrets

🚀 Usage

Manual Execution

  1. Clone the repository:
git clone https://github.com/MaheshTechnicals/FNO-Stocks-list.git
cd F-O-Stocks-list
  1. Install dependencies:
npm install
  1. Run the script:
node index.js
  1. The script will generate:
  • derivatives_symbols({count}).csv
  • tradingview_symbols({count}).txt

GitHub Actions Automation

The workflow runs automatically on the 1st of every month and can also be triggered manually:

on:
  workflow_dispatch:
  schedule:
    - cron: '0 0 1 * *'  # 1st day of every month at 00:00 UTC
  • Deletes the previous release and tag named latest.
  • Generates updated files.
  • Uploads files as assets to a new release tagged latest.

📝 Output Files

CSV Example (derivatives_symbols({count}).csv)

Sr. No. Symbol
1 360ONE
2 ABB
3 APLAPOLLO
... ...

TradingView TXT Example (tradingview_symbols({count}).txt)

NSE:360ONE
NSE:ABB
NSE:APLAPOLLO
...

This file can be imported directly into TradingView watchlists.


🔧 Customization

  • To change the schedule, edit .github/workflows/release.yml cron expression.
  • To change Node.js version, edit setup-node@v3 step in the workflow.
  • Filenames automatically include the symbol count.

⚙️ License

This project is licensed under the MIT License.
See LICENSE for details.


🙌 Contributions

Contributions, bug reports, and suggestions are welcome!
Please open an issue or submit a pull request.


📫 Contact

Mahesh Technicals

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages