[Fix] Resolve NSE bhavcopy format migration issues #81 & #83#115
Merged
Conversation
- Issue #81 & #83: NSE deprecated old ZIP bhavcopy format on Jul 8, 2024 - Implement hybrid approach using daily-reports API: - For recent dates: Use new UDiff format from daily-reports API - For historical dates: Fall back to BHAVDATA-FULL (works for all dates) - Pass data as-is without modification per user request - Add NSEDailyReports class to handle NSE daily-reports API - Support 39+ report types via new download_report() function - Add list_available_reports() to discover available datasets - Maintains backward compatibility for historical date access - Data format changes as per NSE API updates (no backward compatibility) New API: - nse.download_report(file_key, dest): Download any NSE report - nse.list_available_reports(): Discover all available report types
- Update bhavcopy test to expect BHAVDATA-FULL format for historical dates - Add test_bhavcopy_recent() for recent UDiff format data - Add test_list_available_reports() to verify API discovery - Add test_download_report() to verify generic report download - All tests pass (50 tests total)
…ly reports API - Add NSE Daily Reports section to API_REFERENCE.md with list_available_reports() and download_report() documentation - Update stock_df() format note to explain July 8, 2024 transition and automatic format handling - Add NSE Daily Reports examples section to QUICKSTART.md - Update Key Features list to include 39+ NSE daily reports support - Enhance HISTORICAL_DATA_GUIDE.md with format changes explanation and new download_report() examples
This was referenced Mar 16, 2026
Closed
- Version bump: 0.31.2 -> 0.32.0 (minor version for new features) - Added CHANGELOG entry documenting: - New NSEDailyReports class and daily-reports API support - New download_report() and list_available_reports() methods - Hybrid bhavcopy format support (UDiff + BHAVDATA-FULL) - Fixed issues #81 and #83
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.
Implements hybrid approach using NSE daily-reports API for recent dates and BHAVDATA-FULL fallback for historical dates. All tests pass. Resolves issues #81 and #83.