swapniljariwala / nsepy

Python Library to get publicly available data on NSE website ie. stock quotes, historical data, live indices
https://nsepy-xyz.web.app
Other
758 stars 378 forks source link

nsepy get_history() not showing data for scripts in T2T timeline #154

Open vssource opened 4 years ago

vssource commented 4 years ago

Hi @swapniljariwala ,

I was trying to analyze DMART data and I found that nsepy-->get_history() method is not showing data of DMART from 04-MAR-2020 to 25-MAY-2020. After analyzing this, I found that DMART was moved to the T2T (T group of companies) during this time period. can someone assist here?

Thanks, Vaibhav Shah

jayshahpy commented 4 years ago

Hi, can yoi share your code here and lets have a look.

vssource commented 4 years ago

It is a very simple 3 lines code and please check the output. the reason is DMART was in the T2T segment during that period of time.

CODE: from datetime import date from nsepy import get_history data = get_history(symbol='DMART', start=date(2020,3,1), end=date(2020,5,31)) print(data)

OUTPUT:

       Symbol Series  Prev Close  ...  Trades  Deliverable Volume  %Deliverble

Date ...
2020-03-02 DMART EQ 2323.95 ... 140583 1176231 0.5737 2020-03-03 DMART EQ 2228.95 ... 103367 689649 0.5506 2020-05-27 DMART EQ 2283.25 ... 93807 526101 0.6997 2020-05-28 DMART EQ 2200.20 ... 80543 492546 0.5312 2020-05-29 DMART EQ 2308.45 ... 176493 2892391 0.7613

[5 rows x 14 columns]

InnovArul commented 4 years ago

@vssource Are you able to retrieve the data? Mine is stuck and very slow. Does that mean NSE blocked me? :)