public MFSIP placeMFSIP(String tradingsymbol, String frequency, int installmentDay, int instalments, int initialAmount, double amount) throws KiteException, IOException, JSONException {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("tradingsymbol", tradingsymbol);
        params.put("frequency", frequency);
        params.put("instalment_day", installmentDay);
        params.put("instalments", instalments);
        params.put("initial_amount", initialAmount);
        params.put("amount", amount);

        MFSIP MFSIP = new MFSIP();
        JSONObject response = new KiteRequestHandler(proxy).postRequest(routes.get("mutualfunds.sips.place"),params, apiKey, accessToken);
        MFSIP.orderId = response.getJSONObject("data").getString("order_id");
        MFSIP.sipId = response.getJSONObject("data").getString("sip_id");
        return MFSIP;
    }
public MFSIP placeMFSIP ( String tradingsymbol , String frequency , int installmentDay , int instalments , int initialAmount , double amount ) throws KiteException , IOException , JSONException { Map < String , Object > params = new HashMap < String , Object > ( ) ; params . put ( "tradingsymbol" , tradingsymbol ) ; params . put ( "frequency" , frequency ) ; params . put ( "instalment_day" , installmentDay ) ; params . put ( "instalments" , instalments ) ; params . put ( "initial_amount" , initialAmount ) ; params . put ( "amount" , amount ) ; MFSIP MFSIP = new MFSIP ( ) ; JSONObject response = new KiteRequestHandler ( proxy ) . postRequest ( routes . get ( "mutualfunds.sips.place" ) , params , apiKey , accessToken ) ; MFSIP . orderId = response . getJSONObject ( "data" ) . getString ( "order_id" ) ; MFSIP . sipId = response . getJSONObject ( "data" ) . getString ( "sip_id" ) ; return MFSIP ; }
Place a mutualfunds sip.
@param tradingsymbol Tradingsymbol (ISIN) of the fund.
@param frequency weekly, monthly, or quarterly.
@param amount Amount worth of units to purchase. It should be equal to or greated than minimum_additional_purchase_amount and in multiple of purchase_amount_multiplier in the instrument master.
@param installmentDay If Frequency is monthly, the day of the month (1, 5, 10, 15, 20, 25) to trigger the order on.
@param instalments Number of instalments to trigger. If set to -1, instalments are triggered at fixed intervals until the SIP is cancelled.
@param initialAmount Amount worth of units to purchase before the SIP starts. Should be equal to or greater than minimum_purchase_amount and in multiple of purchase_amount_multiplier. This is only considered if there have been no prior investments in the target fund.
@return MFSIP object which contains sip id and order id.
@throws KiteException is thrown for all Kite trade related errors.
@throws IOException is thrown when there is connection related error.