Skip to content

ysai258/Extract-stocks-data-from-NSE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4ab68e8 · May 21, 2021

History

3 Commits
May 21, 2021
May 21, 2021
May 21, 2021

Repository files navigation

Extract-stocks-data-from-NSE

Extract_data.py:

  1. First we access the https://www.nseindia.com/ using headers.
  2. Then we extract cookies from the nse website.
  3. Using those cookies we create a session.
  4. Then access the api of nse website. Sample api link for SBIN is https://www.nseindia.com/api/quote-equity?symbol=SBIN
  5. Then we take the required data i.e open , close etc. Problem1_Code Problem1_Output

last_Thursday.py:

  1. To get last Thursday for a given month and year we get the number of days in that month in the respective year.
  2. Then looping from backwards of day i.e., in april we loop from 30 we check which day is it if we get Thursday then we return that date.
  3. To check whether the given date is last Thursday we convert the given date which is string to date format.
  4. Then we call get last Thursday of that month and check both if both are equal then return true else false. Problem2_Code Problem2_Output

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages