We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Dear sir,
There is absolute no documentation on how to read indices like NIFTY from historical_data() function or by any other way.
Please help me. Thank you in advance sir.
The text was updated successfully, but these errors were encountered:
Not sure about the documentation but I think below code might help you.
... ... import pandas as pd from datetime import datetime as dt from datetime import timedelta as td ... ... ... # do all kite object creation steps sbin_token = kite.ltp("NSE:SBIN")['NSE:SBIN']['instrument_token'] df = pd.DataFrame(kite.historical_data( sbin_token, dt.today() - td(days=7), dt.today(), '15minute')) print(df) nf_token = kite.ltp("NSE:NIFTY 50")['NSE:NIFTY 50']['instrument_token'] df = pd.DataFrame(kite.historical_data( nf_token, dt.today() - td(days=7), dt.today(), '15minute')) print(df) bnf_token = kite.ltp("NSE:NIFTY BANK")['NSE:NIFTY BANK']['instrument_token'] df = pd.DataFrame(kite.historical_data( bnf_token, dt.today() - td(days=7), dt.today(), '15minute')) print(df)
Sorry, something went wrong.
The response structure section of all APIs explains the fields.
Not sure about the documentation but I think below code might help you. ... ... import pandas as pd from datetime import datetime as dt from datetime import timedelta as td ... ... ... # do all kite object creation steps sbin_token = kite.ltp("NSE:SBIN")['NSE:SBIN']['instrument_token'] df = pd.DataFrame(kite.historical_data( sbin_token, dt.today() - td(days=7), dt.today(), '15minute')) print(df) nf_token = kite.ltp("NSE:NIFTY 50")['NSE:NIFTY 50']['instrument_token'] df = pd.DataFrame(kite.historical_data( nf_token, dt.today() - td(days=7), dt.today(), '15minute')) print(df) bnf_token = kite.ltp("NSE:NIFTY BANK")['NSE:NIFTY BANK']['instrument_token'] df = pd.DataFrame(kite.historical_data( bnf_token, dt.today() - td(days=7), dt.today(), '15minute')) print(df)
Thanks. Your solution works. https://hjlabs.in
vividvilla
No branches or pull requests
Dear sir,
There is absolute no documentation on how to read indices like NIFTY from historical_data() function or by any other way.
Please help me.
Thank you in advance sir.
The text was updated successfully, but these errors were encountered: