code: public JSONObject convertPosition(String tradingSymbol, String exchange, String transactionType, String positionType, String oldProduct, String newProduct, int quantity) throws KiteException, JSONException, IOException {
          Map<String, Object> params = new HashMap<>();
          params.put("tradingsymbol", tradingSymbol);
          params.put("exchange", exchange);
          params.put("transaction_type", transactionType);
          params.put("position_type", positionType);
          params.put("old_product", oldProduct);
          params.put("new_product", newProduct);
          params.put("quantity", quantity);
  
          KiteRequestHandler kiteRequestHandler = new KiteRequestHandler(proxy);
          return kiteRequestHandler.putRequest(routes.get("portfolio.positions.modify"), params, apiKey, accessToken);
      }
docs: Modifies an open position's product type. Only an MIS, CNC, and NRML positions can be converted.
  @param tradingSymbol Tradingsymbol of the instrument  (ex. RELIANCE, INFY).
  @param exchange Exchange in which instrument is listed (NSE, BSE, NFO, BFO, CDS, MCX).
  @param transactionType Transaction type (BUY or SELL).
  @param positionType day or overnight position
  @param oldProduct Product code (NRML, MIS, CNC).
  @param newProduct Product code (NRML, MIS, CNC).
  @param quantity Order quantity
  @return JSONObject  which will have status.
  @throws KiteException is thrown for all Kite trade related errors.
  @throws JSONException is thrown when there is exception while parsing response.
  @throws IOException is thrown when there is connection error.