I have two factor authentication already but when I place orders with kiteSdk.placeOrder(orderParams, Constants.VARIETY_REGULAR); I am getting exception and when I print the message I get
The error is self explanatory. You can't use LIMIT orders in post-market session.This is now but earlier when the market is was open it was not the issue. will try when market is open.
Do you have totp enabled?? That might be the issue.
Got the kite exception message : null
Got the kite exception getLocalizedMessage : null
Happy??
I am getting exception and when I print the message I get
Got the kite exception message : null
OrderParams orderParams = new OrderParams();
orderParams.quantity = 1;
orderParams.orderType = Constants.ORDER_TYPE_LIMIT;
orderParams.tradingsymbol = "ASHOKLEY";
orderParams.product = Constants.PRODUCT_CNC;
orderParams.exchange = Constants.EXCHANGE_NSE;
orderParams.transactionType = Constants.TRANSACTION_TYPE_BUY;
orderParams.validity = Constants.VALIDITY_DAY;
orderParams.price = 122.2;
orderParams.triggerPrice = 0.0;
orderParams.tag = "myTag"; //tag is optional and it cannot be more than 8 characters and only alphanumeric is allowed
System.out.println("The connectoKite Step 7 " );
Jun 02, 2022 3:40:17 PM okhttp3.internal.platform.Platform log
INFO: --> GET https://api.kite.trade/user/margins/equity
Jun 02, 2022 3:40:17 PM okhttp3.internal.platform.Platform log
INFO: User-Agent: javakiteconnect/3.1.14
Jun 02, 2022 3:40:17 PM okhttp3.internal.platform.Platform log
INFO: X-Kite-Version: 3
Jun 02, 2022 3:40:17 PM okhttp3.internal.platform.Platform log
INFO: Authorization: token sdsdfasdfassfsh4:adsfjkladsjfklja5gNriJ4tHY5e
Jun 02, 2022 3:40:17 PM okhttp3.internal.platform.Platform log
INFO: --> END GET
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: <-- 200 https://api.kite.trade/user/margins/equity (320ms)
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: date: Thu, 02 Jun 2022 10:10:18 GMT
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: content-type: application/json
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: cf-cache-status: DYNAMIC
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: strict-transport-security: max-age=15552000; includeSubDomains
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: server: cloudflare
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: cf-ray: 714f65ffaaed1d35-BLR
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO:
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: {"status":"success","data":{"enabled":true,"net":1108,"available":{"adhoc_margin":0,"cash":1108,"opening_balance":1108,"live_balance":1108,"collateral":0,"intraday_payin":0},"utilised":{"debits":0,"exposure":0,"m2m_realised":0,"m2m_unrealised":0,"option_premium":0,"payout":0,"span":0,"holding_sales":0,"turnover":0,"liquid_collateral":0,"stock_collateral":0,"delivery":0}}}
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: <-- END HTTP (374-byte body)
The connectoKite Step 6
The margin cash is 1108
The uttilized debits is 0
The connectoKite Step 7
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: --> POST https://api.kite.trade/orders/regular
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: Content-Type: application/x-www-form-urlencoded
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: Content-Length: 150
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: User-Agent: javakiteconnect/3.1.14
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: X-Kite-Version: 3
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: Authorization: token aws2uxxxxxxxxh4:ooppsakksdirfksflakjsfdlkjsfd
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO:
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: product=CNC&quantity=1&trigger_price=0.0&price=142.05&tradingsymbol=ASHOKLEY&exchange=NSE&validity=DAY&tag=myTag&transaction_type=BUY&order_type=LIMIT
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: --> END POST (150-byte body)
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: <-- 400 https://api.kite.trade/orders/regular (48ms)
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: date: Thu, 02 Jun 2022 10:10:18 GMT
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: content-type: application/json
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: content-length: 357
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: cf-cache-status: DYNAMIC
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: strict-transport-security: max-age=15552000; includeSubDomains
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: server: cloudflare
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: cf-ray: 714f66002bad1d35-BLR
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO:
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: {"status":"error","message":"LIMIT orders are not allowed during post-market session. Try placing a CNC Market order. [Read more.](https://support.zerodha.com/category/trading-and-markets/margin-leverage-and-product-and-order-types/articles/what-does-the-error-16473-only-board-lot-market-orders-are-allowed-mean)","data":null,"error_type":"InputException"}
Jun 02, 2022 3:40:18 PM okhttp3.internal.platform.Platform log
INFO: <-- END HTTP (357-byte body)
Got the kite exception message : null
Got the kite exception getLocalizedMessage : null
com.zerodhatech.kiteconnect.kitehttp.exceptions.InputException
at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.dealWithException(KiteResponseHandler.java:54)
at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.handle(KiteResponseHandler.java:20)
at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.postRequest(KiteRequestHandler.java:86)
at com.zerodhatech.kiteconnect.KiteConnect.placeOrder(KiteConnect.java:359)
at KiteConnectValue.connectoKite(KiteConnectValue.java:251)
at AlgoTrade.main(AlgoTrade.java:1521)
The connectoKite Step 7A
The connectoKite Step 8
Don't post app or client specific tokens on the public threads.
INFO: {"status":"error","message":"TOTP is mandatory to place orders on third-party apps. Learn how to set up TOTP for your account [here](https://support.zerodha.com/category/your-zerodha-account/login-credentials/login-credentials-of-trading-platforms/articles/time-based-otp-setup-mobile-only).","data":null,"error_type":"InputException"}
Jun 03, 2022 12:35:50 PM okhttp3.internal.platform.Platform log