pratik141 / nsedt

Library to collect NSE data in pandas dataframe
http://nsedt.nse.pratikanand.co.in/
Apache License 2.0
34 stars 16 forks source link

dates not working well on index data #29

Closed sameerin closed 1 year ago

sameerin commented 1 year ago

I tried to get nifty50 data, but dates input and the output don't match, this problem does not happen with equity

code

from nsedt import indices as eq from datetime import date

start_date = date(2023, 9, 4) end_date = date(2023, 9, 7) print(eq.get_price(start_date, end_date, symbol="NIFTY 50"))

output

Open Price High Price Close Price Low Price Date Total Traded Quantity Total Traded Value 0 19525.05 19545.15 19528.80 19432.85 2023-09-03T18:30:00.000Z 396071122 24822.79 1 19564.65 19587.05 19574.90 19525.75 2023-09-04T18:30:00.000Z 303958622 24029.89 2 19581.20 19636.45 19611.05 19491.50 2023-09-05T18:30:00.000Z 512974083 32500.52

Output is 3rd 4th and 5th of September whereas input was 4 to 7

sameerin commented 1 year ago

Also the date returned is in a weird format 2023-06-04T18:30:00.000Z , this is not the case with equity, where date is returned in proper format and is easy to sort

pratik141 commented 1 year ago

I'm looking into it, but the strange thing is that I'm getting different results from the NSE API.

sameerin commented 1 year ago

yes, its somehow inconsistent, equity is working all fine

sandybansal83 commented 1 year ago

I want to download historical data of the below Indices but unable to do so. Can some please explain how can i do this because i cannot find any documentation.

pratik141 commented 1 year ago

@sandybansal83 Soon I will add it

pratik141 commented 1 year ago

Removed Volume Open Price High Price Close Price Low Price Date 0 19525.05 19545.15 19528.80 19432.85 04-SEP-2023 1 19581.20 19636.45 19611.05 19491.50 06-SEP-2023 2 19598.65 19737.00 19727.05 19550.05 07-SEP-2023 3 19564.65 19587.05 19574.90 19525.75 05-SEP-2023 4 19774.80 19867.15 19819.95 19728.05 08-SEP-2023

@sameerin looks like data is accurate try 0.0.9

pratik141 commented 1 year ago

closing this issue please feel free to re-open or create a new issue