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

Intervals in historical data fetch #16

Open
rohitpsk opened this issue Mar 12, 2023 · 1 comment
Open

Intervals in historical data fetch #16

rohitpsk opened this issue Mar 12, 2023 · 1 comment

Comments

@rohitpsk
Copy link

Where can i find intervals available for historical data fetch. I am unable to get data for one minute

@coprem
Copy link

coprem commented Aug 1, 2023

@rohitpsk you can use 'minute', 'day', '3minute', '5minute', '10minute', '15minute', '30minute', '60minute' for respective intervals.

Example Code:

from datetime import*

interval = 'minute'
Instrument = 'NSE:HDFCBANK'
Instrument_token = kite.ltp(Instrument)[Instrument]['instrument_token']
from_date = datetime(2023, 7, 31, 8, 40, 00)
to_date= datetime(2023, 8, 1, 8, 40, 00)
kite.historical_data(Instrument_token, from_date, to_date, interval)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants