code: public void getInstrumentsForExchange(KiteConnect kiteConnect) throws KiteException, IOException {
          // Get instruments for an exchange.
          List<Instrument> nseInstruments = kiteConnect.getInstruments("CDS");
          System.out.println(nseInstruments.size());
      }
docs: Get instruments for the desired exchange.