Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Order placement fails intermittently using Java SDK

    NodeJS SDK
    0
    2
    14
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sekharn last edited by sekharn

      There is no logging enabled on the client SDK, so I cannot see the real reason behind it. This happens sometimes only.

      can you help me debug and tell what's the issue? below are the log statements. this same code runs sometimes. I even added a check to see if the client is connected.

      2025-01-20 05:47:28,402Z [pool-8-thread-1] INFO com.trade.bot.OrbBotLogic - might place buy order on NIFTY23JAN2523300CE if not in DB: {"orderid":null,"exchange":"NFO","symbolToken":null,"transactiontype":"BUY","quantity":350,"price":0.0,"producttype":"INTRADAY","ordertype":"MARKET","duration":"DAY","variety":"NORMAL","tradingsymbol":"NIFTY23JAN2523300CE","triggerprice":null,"squareoff":"0","stoploss":"0","symboltoken":"54937"}
      2025-01-20 05:47:28,446Z [pool-8-thread-1] INFO c.a.s.http.SmartAPIResponseHandler - ***************************
      2025-01-20 05:47:28,446Z [pool-8-thread-1] INFO com.trade.MarketFeedSync - checking if smart connect is still connected with some call User [userName=C**** , userId=C*, mobileNo=, brokerName=, email=, lastLoginTime=null, accessToken=null, refreshToken=null, products=[MARGIN, MIS, NRML, CNC, CO, BO], exchanges=[nse_fo, nse_cm, cde_fo, ncx_fo, bse_fo, bse_cm, mcx_fo], feedToken=null]
      2025-01-20 05:47:28,446Z [pool-8-thread-1] INFO com.trade.bot.OrbBotLogic - market api handle connected, placing order...com.angelbroking.smartapi.models.OrderParams@463464c8
      2025-01-20 05:47:28,508Z [pool-8-thread-1] INFO c.a.s.http.SmartAPIResponseHandler - ***************************
      2025-01-20 05:47:28,508Z [pool-8-thread-1] ERROR c.angelbroking.smartapi.SmartConnect - JSONObject["data"] is not a JSONObject.
      2025-01-20 05:47:28,508Z [pool-8-thread-1] WARN com.trade.bot.OrbBotLogic - Order not sent to broker, so will not persist.

      1 Reply Last reply Reply Quote 0
      • A
        admin last edited by admin

        @sekharn you can seek help from others on the forum for debugging. Java SDK is working fine.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post