Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dates not working well on index data #29

Closed
sameerin opened this issue Sep 7, 2023 · 7 comments · Fixed by #30 or #31
Closed

dates not working well on index data #29

sameerin opened this issue Sep 7, 2023 · 7 comments · Fixed by #30 or #31
Assignees
Labels
bug Something isn't working equity for equity waiting-response If no response is received within 15 days, this will be closed.

Comments

@sameerin
Copy link

sameerin commented Sep 7, 2023

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
Copy link
Author

sameerin commented Sep 7, 2023

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 pratik141 added bug Something isn't working equity for equity labels Sep 7, 2023
@pratik141 pratik141 self-assigned this Sep 7, 2023
@pratik141
Copy link
Owner

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

@sameerin
Copy link
Author

yes, its somehow inconsistent, equity is working all fine

@sandybansal83
Copy link

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.

  • Nifty 50 Value 20
  • Nifty 200 Momentum 30
  • Nifty Alpha 50
  • Nifty 100 Low Volatility 30
  • Nifty Quality 30

@pratik141
Copy link
Owner

@sandybansal83 Soon I will add it

@pratik141
Copy link
Owner

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working equity for equity waiting-response If no response is received within 15 days, this will be closed.
Projects
None yet
3 participants