You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### `stock_df(symbol, from_date, to_date)` - Format Note
398
+
As of July 8, 2024, NSE transitioned from direct CSV format to compressed UDiff format. The library handles this automatically:
399
+
- Dates >= July 8, 2024: Returns UDiff format (newer column structure)
400
+
- Historical dates: Falls back to BHAVDATA-FULL format
401
+
402
+
Both formats are returned as raw CSV data with no column mapping. See [HISTORICAL_DATA_GUIDE](HISTORICAL_DATA_GUIDE.md) for detailed column specifications.
Copy file name to clipboardExpand all lines: docs/HISTORICAL_DATA_GUIDE.md
+88-6Lines changed: 88 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,21 @@ A comprehensive guide to downloading historical market data using `jugaad-data`.
18
18
19
19
Bhavcopies are complete daily market snapshots published by stock exchanges after market close. They contain all traded contracts with their OHLC prices.
20
20
21
+
### Format Changes (July 8, 2024)
22
+
23
+
On July 8, 2024, NSE transitioned from the old ZIP-based bhavcopy format to the **Unified Distilled File Format (UDiff)**. The library now automatically handles both formats:
24
+
25
+
-**Recent Dates (≥ July 8, 2024):** Uses UDiff format from NSE's daily-reports API
26
+
- Format: More comprehensive data structure
27
+
- Availability: Current day + previous trading day (via API)
28
+
29
+
-**Historical Dates (< July 8, 2024):** Uses BHAVDATA-FULL format
30
+
- Format: CSV with delivery information
31
+
- Availability: All historical dates
32
+
- No ZIP decompression required
33
+
34
+
**No action needed on your part** - the library automatically chooses the best available format!
35
+
21
36
### Types of Bhavcopies
22
37
23
38
1.**Equity Bhavcopy** - All equity securities traded on NSE
@@ -31,23 +46,38 @@ Bhavcopies are complete daily market snapshots published by stock exchanges afte
31
46
from datetime import date
32
47
from jugaad_data.nse import bhavcopy_save
33
48
34
-
# Download for specific date
49
+
# Download for specific date (works for all dates, automatic format selection)
0 commit comments