Unable to place order - com.zerodhatech.kiteconnect.kitehttp.exceptions.InputException

dezmozz
Tried to place an order with the following code

public class OrderServices {
public static void BuyOrder(KiteConnect kiteSdk) throws KiteException, IOException {

OrderParams orderParams = new OrderParams();
orderParams.quantity = 1;
orderParams.orderType = Constants.ORDER_TYPE_MARKET;
orderParams.tradingsymbol = "IDFC";
orderParams.product = Constants.PRODUCT_MIS;
orderParams.exchange = Constants.EXCHANGE_NSE;
orderParams.transactionType = Constants.TRANSACTION_TYPE_BUY;
orderParams.validity = Constants.VALIDITY_IOC;
orderParams.price = 0.0;
orderParams.triggerPrice = 0.0;
orderParams.tag = "myTag"; //tag is optional and it cannot be more than 8 characters and only alphanumeric is allowed


Order order = kiteSdk.placeOrder(orderParams, Constants.VARIETY_REGULAR);
System.out.println(order.orderId);
}
}

.
.
.
.
.
// ORDER EXECUTION
try{
System.out.println("REQUESTING TO MAKE ORDER");
OrderServices.BuyOrder(kiteSdk);
System.out.println("ORDER SUCCESSFUL ");
} catch(Exception | KiteException e) {
System.out.println("Exception inside orders is :" + e +
" \n " + e.getMessage());
}
Sign In or Register to comment.