Fix NSE API: Update to new historicalOR endpoint - Closes #108#110
Merged
Conversation
Contributor
sevakram
commented
Mar 14, 2026
- todo: Add modern Chrome 134 User-Agent and Sec-CH-UA headers to bypass Akamai
- Fix NSE API endpoint - Issue Slow tests causing long test suite execution - 6 tests exceed 5 seconds #108
…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.
68338ad to
b048a23
Compare
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.