Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. sugagenius
    3. Best
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 7
    • Best 2
    • Groups 0

    Best posts made by sugagenius

    • scripconsent order parameter missing in Java library. Order placement fails with Null

      The scripconsent=yes parameter cannot be set with smartconnect smartapi-java-2.2.6.jar which is the latest. I get an error as below from SmartConnect API:

      2026-02-18 13:27:55.094 ERROR [ Transaction-0] com.angelbroking.smartapi.SmartConnect : [316] JSONObject["data"] is not a JSONObject (class org.json.JSONObject$Null : null).

      My order placement fails. Upon investigation I found I get error only for certain stocks like stocks of BSE shares which are cautionary. I dont get this when i place orders for stocks like HDFC or SILVERMIC.

      I cant override or cannot do much. I have done all my code with your JAVA APIs, and now I am stuck in this blocker. Please update the JAVA API, if smartconnect API added any changes so that your API documentation is in sync with your Java implementation.

      posted in Java SDK
      S
      sugagenius
    • RE: scripconsent order parameter missing in Java library. Order placement fails with Null

      I fixed the issue by changing 3 files in the JAVA SDK code and rebuilding it. I doubt fixing Order.java alone would resolve this.

      I fixed SmartConnect.java -> params.put("scripconsent", "yes");

      Order.java ->
      @SerializedName("scripconsent")
      public String scripconsent

      and OrderParams.java ->
      public String scripconsent

      Now I can see AMO orders reaching Angel One :). Huge relief. Will re-check on Monday once the exchanges are online just to be sure.

      posted in Java SDK
      S
      sugagenius