From a7524a45d039f1a6a650ca33cb76efbf7772e561 Mon Sep 17 00:00:00 2001 From: Pranjal Joshi Date: Thu, 26 Dec 2024 12:38:16 +0530 Subject: [PATCH] v2.23 - Fixed F&O stock symbol data source * Upgraded deprecated GH action versions --- .github/workflows/workflow-test.yml | 4 ++-- src/classes/Changelog.py | 5 ++++- src/classes/Fetcher.py | 10 +++++----- src/release.md | 1 + 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/workflow-test.yml b/.github/workflows/workflow-test.yml index d06f4198..8509bf73 100644 --- a/.github/workflows/workflow-test.yml +++ b/.github/workflows/workflow-test.yml @@ -28,7 +28,7 @@ jobs: python-version: 3.11.6 - name: Restore Dependencies from Cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~\AppData\Local\pip\Cache key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} @@ -121,7 +121,7 @@ jobs: echo ${{steps.create_pr.outputs.pr_number}} >> pr.txt - name: Save PR Log File - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: PR_Log.txt path: pr.txt \ No newline at end of file diff --git a/src/classes/Changelog.py b/src/classes/Changelog.py index 21ab5cdf..cf14c7de 100644 --- a/src/classes/Changelog.py +++ b/src/classes/Changelog.py @@ -7,7 +7,7 @@ from classes.ColorText import colorText -VERSION = "2.22" +VERSION = "2.23" changelog = colorText.BOLD + '[ChangeLog]\n' + colorText.END + colorText.BLUE + ''' [1.00 - Beta] @@ -293,4 +293,7 @@ [2.22] 1. RSI and 9 SMA of RSI based reversal added - Momentum based execution strategy. + +[2.23] +1. Changed Data Source for F&O Stocks - Using Zerodha Kite instead of Broken NSE Website ''' + colorText.END diff --git a/src/classes/Fetcher.py b/src/classes/Fetcher.py index a6891ade..004a4c8e 100644 --- a/src/classes/Fetcher.py +++ b/src/classes/Fetcher.py @@ -138,7 +138,7 @@ def fetchCodes(self, tickerOption,proxyServer=None): 9: "https://archives.nseindia.com/content/indices/ind_niftymidcap50list.csv", 10: "https://archives.nseindia.com/content/indices/ind_niftymidcap100list.csv", 11: "https://archives.nseindia.com/content/indices/ind_niftymidcap150list.csv", - 14: "https://archives.nseindia.com/content/fo/fo_mktlots.csv" + 14: "https://api.kite.trade/instruments" } url = tickerMapping.get(tickerOption) @@ -152,10 +152,10 @@ def fetchCodes(self, tickerOption,proxyServer=None): cr = csv.reader(res.text.strip().split('\n')) if tickerOption == 14: - for i in range(5): - next(cr) # skipping first line - for row in cr: - listStockCodes.append(row[1].strip()) + cols = next(cr) + df = pd.DataFrame(cr, columns=cols) + listStockCodes = list(set(df[df['segment'] == 'NFO-FUT']["name"].to_list())) + listStockCodes.sort() else: next(cr) # skipping first line for row in cr: diff --git a/src/release.md b/src/release.md index 1333b9e8..1bd7cd3b 100644 --- a/src/release.md +++ b/src/release.md @@ -7,6 +7,7 @@ Screeni-py is now on **YouTube** for additional help! - Thank You for your suppo ⚠️ **Executable files (.exe, .bin and .run) are now DEPRECATED! Please Switch to Docker** +1. Fixed Breakout Screening for **F&O Stocks** (Changed Data Source to Zerodha Kite from NSE website) 1. **RSI** based **Reversal** using *9 SMA* of RSI - Try `Option > 6 > 8` 2. **NSE Indices** added to find Sectoral opportunities - Try Index `16 > Sectoral Indices` 3. **Backtesting Reports** Added for Screening Patterns to Develope and Test Strategies!