code: public void getHistoricalData(KiteConnect kiteConnect) throws KiteException, IOException {
          /** Get historical data dump, requires from and to date, intrument token, interval, continuous (for expired F&O contracts)
           * returns historical data object which will have list of historical data inside the object.*/
          SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
          Date from =  new Date();
          Date to = new Date();
          try {
              from = formatter.parse("2018-01-03 12:00:00");
              to = formatter.parse("2018-01-03 22:49:12");
          }catch (ParseException e) {
              e.printStackTrace();
          }
          HistoricalData historicalData = kiteConnect.getHistoricalData(from, to, "11946498", "15minute", false);
          System.out.println(historicalData.dataArrayList.size());
          System.out.println(historicalData.dataArrayList.get(0).volume);
          System.out.println(historicalData.dataArrayList.get(historicalData.dataArrayList.size() - 1).volume);
      }
docs: Get historical data for an instrument.