code: public void getTrades(KiteConnect kiteConnect) throws KiteException, IOException {
          // Returns tradebook.
          List<Trade> trades = kiteConnect.getTrades();
          for (int i=0; i < trades.size(); i++) {
              System.out.println(trades.get(i).tradingSymbol+" "+trades.size());
          }
          System.out.println(trades.size());
      }
docs: Get tradebook