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 377 forks source link

Unable to fetch data for some symbols #210

Open online-irrational-mind opened 3 years ago

online-irrational-mind commented 3 years ago

While I am able to retrieve data for most of the symbols, there are few symbols where get_history returns empty dataframe. Tried it with both nsecli and from python prompt. Also, tried with different series setting. Is anyone else facing this issue? e.g. PVR does not return history but PVP does.

Python39\site-packages\nsepy>nsecli history --symbol PVR -s 2021-11-01 -e 2021-11-30 -o output.csv
Empty DataFrame
Columns: [Symbol, Series, Prev Close, Open, High, Low, Last, Close, VWAP, Volume, Turnover, Trades, Deliverable Volume, %Deliverble]
Index: []
Saved to: output.csv

Python39\site-packages\nsepy>nsecli history --symbol PVR -s 2021-11-01 -e 2021-11-30 -o output.csv --series BE
Empty DataFrame
Columns: [Symbol, Series, Prev Close, Open, High, Low, Last, Close, VWAP, Volume, Turnover, Trades, Deliverable Volume, %Deliverble]
Index: []
Saved to: output.csv

Python39\site-packages\nsepy>nsecli history --symbol PVP -s 2021-11-01 -e 2021-11-30 -o output.csv --series EQ
           Symbol Series  Prev Close  Open  High   Low  Last  Close  VWAP  Volume      Turnover  Trades  Deliverable Volume  %Deliverble
Date
2021-11-01    PVP     EQ        5.05  4.95  5.15  4.90   4.9   4.95  5.00   72922  3.646372e+10     177               55259       0.7578
2021-11-02    PVP     EQ        4.95  5.10  5.10  4.85   4.9   5.00  4.96  138569  6.874094e+10     139               98145       0.7083
2021-11-03    PVP     EQ        5.00  5.15  5.15  4.75   4.8   4.75  4.86  141979  6.893994e+10     197              114796       0.8085
2021-11-04    PVP     EQ        4.75  4.95  4.95  4.75   4.9   4.85  4.86   31887  1.551178e+10     140               28532       0.8948
2021-11-08    PVP     EQ        4.85  4.90  4.90  4.65   4.8   4.75  4.76   98426  4.686989e+10     201               75300       0.7650
Saved to: output.csv
online-irrational-mind commented 3 years ago

duplicate of #181

online-irrational-mind commented 3 years ago

However, solution suggested i.e. inserting space does not work for many symbols.