Skip to content

Instantly share code, notes, and snippets.

@Lakshmi-1212
Created April 30, 2023 10:20
Show Gist options
  • Save Lakshmi-1212/5077c5a663a423897adb635d78505be4 to your computer and use it in GitHub Desktop.
Save Lakshmi-1212/5077c5a663a423897adb635d78505be4 to your computer and use it in GitHub Desktop.
# 5 Years Data
DATA_RANGE_DAYS = 365*5
END_DATE = date.today()
START_DATE = END_DATE - timedelta(DATA_RANGE_DAYS)
def get_stock_data(scrip, start_date=START_DATE, end_date=END_DATE, is_index=False):
return get_history(symbol=scrip, start=start_date, end=end_date,index = is_index)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment