Open gaurav34065 opened 1 month ago
hye @gaurav34065 is this change on BSE's end breaking the bhavcopy feature?
@sdabhi23 yes, seems like it's not able to find the bhavcopy. I tested this via below sample code
#!/bin/env python3
from bsedata.bse import BSE
from datetime import datetime, timedelta
b = BSE()
b = BSE(update_codes = True)
yesterday = datetime.now().date() - timedelta(days=1)
q = b.getBhavCopyData(yesterday)
print(q)
Getting below exception
bsedata.exceptions.BhavCopyNotFound: The BhavCopy file was not found on the BSE website. You are probably trying to get data for a trading holiday.
Oh okay, I will try to release a fix sometime next week. Thanks for reporting!
Looks like in here current format we're fetching as
https://www.bseindia.com/download/BhavCopy/Equity/EQ230924_CSV.ZIP
Needs to be updated like https://www.bseindia.com/download/BhavCopy/Equity/BSE_EQ_BHAVCOPY_23092024_T0.ZIP