Description Usage Arguments Details Value See Also
Function to obtain historical prices with given interval.
1 2 | get_historical_price(object, instrument_token, from, to, interval,
continuous = 0)
|
object |
An object of type kite connect with valid api_key and access_token. |
instrument_token |
An instrument_token. See details below. |
from |
Starting time for history. |
to |
Ending time for history. |
interval |
Interval definition. |
continuous |
True/ False for fetching continuous data (e.g. futures). |
This function returns OHLC price history of a given instrument. The instrument token is the one obtained with a call to get_instruments. The valid intervals are 'minute','day','3minute','5minute','10minute', '15minute','30minute' and '60minute'. The parameters 'from' and 'to' should be in YYYY-MM-DD HH:MM:SS format (no timezone adjustment is applied). Please note: this function is meant to be called as a one-off way to get the quotes.One should not call this function too many times. The api possibly has a rate limit and too many requests will block the user. For continous data, websocket is more appropriate choice. Check the Kite Connect online documentation for more details.
an xts object with OHLC data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.