Navigation

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

    Getting null value for user when generating session

    Test
    0
    5
    38
    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.
    • H
      Hargun-Singh last edited by

      Hello Team,

      I have developed spring boot application, which incorporate smartapi jar (smartapi-java-1.0.0.jar), but unfortunately when I am trying to place dummy order I am getting null pointer exception i.e. it is complaining user is null, the reason seems to be the session which is getting generated is null, could you please suggest me what has went wrong here as it is very hard to identify without proper error response if request is bad.

      FYI I am using predefined method from class SmartConnect.generateSession(String clientCode, String password)

      Sample Request :

      {
      "variety": "NORMAL",
      "tradingsymbol": "SBIN-EQ",
      "symboltoken": "3045",
      "exchange": "NSE",
      "transactiontype": "BUY",
      "ordertype": "LIMIT",
      "producttype": "DELIVERY",
      "duration": "DAY",
      "price": "100",
      "squareoff": "1",
      "stoploss": "0",
      "quantity": "1"
      }

      Please see below error attached (Highlighted part shows library usage ) :

      9d0bb39e-073a-495e-b1a4-ca0a71d48c5c-image.png

      b2ebc941-819d-4c83-8a9d-72fdf651b792-image.png

      I am not fully sure if it is related to migration account for that I have also filled up google form

      https://docs.google.com/forms/d/e/1FAIpQLSdgpCiDhSBa_bsKsec002e9unbeQkipOLFAKW7DzPvmiowsaw/viewform

      Thanks in advance !
      Hargun Singh

      S B 2 Replies Last reply Reply Quote 0
      • S
        shahroz14 @Hargun-Singh last edited by

        @Hargun-Singh I am also facing the same issue and have reported to the support team.

        U 1 Reply Last reply Reply Quote 0
        • B
          bh_nil @Hargun-Singh last edited by

          @Hargun-Singh Hope issue has Resolved ,u need to use updated V2 jar and pass additional parameter to Generate session

          U 1 Reply Last reply Reply Quote 0
          • U
            UtsavM @shahroz14 last edited by

            @shahroz14 You need to pass totp params in generate session.If you wish to do so reply me on utsav.moradiya3@gmail.com , instantaneous code fix. Before admin releases a solution in language, several algo traders have already adopted this temporary method.

            1 Reply Last reply Reply Quote 0
            • U
              UtsavM @bh_nil last edited by

              @Harman08 You need to pass totp params in generate session.If you wish to do so reply me on utsav.moradiya3@gmail.com , instantaneous code fix. Before admin releases a solution in language, several algo traders have already adopted this temporary method.

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