get_historical_price: Function to obtain current historical prices for a...

Description Usage Arguments Details Value See Also

View source: R/restful.R

Description

Function to obtain historical prices with given interval.

Usage

1
2
get_historical_price(object, instrument_token, from, to, interval,
  continuous = 0)

Arguments

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).

Details

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.

Value

an xts object with OHLC data.

See Also

get_instruments

get_quote

get_ohlc

get_ltp


prodipta/kiteconnect3 documentation built on Sept. 24, 2020, 8:30 a.m.