Skip to content

Fix NSE API: Update to new historicalOR endpoint - Closes #108#110

Merged
sevakram merged 2 commits into
masterfrom
fix/akamai-bot-detection
Mar 14, 2026
Merged

Fix NSE API: Update to new historicalOR endpoint - Closes #108#110
sevakram merged 2 commits into
masterfrom
fix/akamai-bot-detection

Conversation

@sevakram
Copy link
Copy Markdown
Contributor

…s Akamai

- Updated User-Agent from Chrome 80/84/120 to Chrome 134.0.6998.166 (Windows 11)
- Added missing Sec-CH-UA-* headers that modern Chrome always sends
- Added DNT and Upgrade-Insecure-Requests headers
- Files updated: nse/history.py, nse/live.py, nse/archives.py, bse/live.py

These changes help bypass Akamai bot detection by making requests look like
legitimate Chrome 134 browser requests instead of legacy/mismatched headers.
@sevakram sevakram force-pushed the fix/akamai-bot-detection branch from 68338ad to b048a23 Compare March 14, 2026 08:17
@sevakram sevakram merged commit 731be24 into master Mar 14, 2026
Update to new /api/historicalOR/generateSecurityWiseHistoricalData endpoint
- Modernize headers with current Chrome 144 user agent
- Add Brotli compression support
- Update parameter structure and report page
- Add delivery data fields (COP_DELIV_QTY, COP_DELIV_PERC)
- Update all tests to work with new API
- All 9 tests passing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants