Navigation

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

    Getting error when place order using web application

    C#/.Net SDK
    2
    13
    82
    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.
    • A
      asksameer last edited by

      Hello @admin ,

      Order placement works properly when I use console application for order placement.
      I am using TRADING api_key for order placement.

      But when I place order using WEB APPLICATION (localhost), I am getting error as "Internal error".
      I am using TRADING api_key for order placement.

      Not sure why it works in CONSOLE app but fails in WEB application.

      Thanks,
      Sam

      A 1 Reply Last reply Reply Quote 0
      • A
        asksameer @asksameer last edited by

        I am not passing jwt token or refresh token when placing orders. Just passing trading api key

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

          HI @asksameer can you post more information to evaluate it above information is insufficient to solve the issue.
          post your req and response.

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

            @admin
            I am dotnet sdk.
            CONSOLE c# application:
            Order placement works correctly in console application.

            WEB c# application: If I use web application to place order, it doesnt work.

            Request:
            {
            "orderid":null,
            "variety":"NORMAL",
            "tradingsymbol":"PHILIPCARB-EQ",
            "symboltoken":"2649",
            "transactiontype":"BUY",
            "exchange":"NSE",
            "ordertype":"MARKET",
            "producttype":"DELIVERY",
            "duration":"DAY",
            "price":"0",
            "squareoff":"0",
            "stoploss":"0",
            "quantity":"1",
            "triggerprice":null
            }

            Response:
            {
            "status":false,
            "message":"Internal Error",
            "errorcode":"AB2001",
            "data":null
            }

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

              HI @asksameer try to execute this
              {
              "variety":"NORMAL",
              "tradingsymbol":"SBIN-EQ",
              "symboltoken":"3045",
              "transactiontype":"BUY",
              "exchange":"NSE",
              "ordertype":"MARKET",
              "producttype":"INTRADAY",
              "duration":"DAY",
              "price":"194.50",
              "squareoff":"0",
              "stoploss":"0",
              "quantity":"1"
              }

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

                @admin
                I am getting same error in WEB application.
                Response:
                {
                "status":false,
                "message":"Internal Error",
                "errorcode":"AB2001",
                "data":null
                }

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

                  Hi @asksameer Are you still facing the same issue.

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

                    @admin
                    yes. Still facing same issue.

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

                      HI @asksameer Post your client id here our team will connect you.

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

                        @admin

                        Client id: S769044

                        A 1 Reply Last reply Reply Quote 0
                        • A
                          asksameer @asksameer last edited by

                          @admin

                          Can you please provide any update on this issue?

                          A 1 Reply Last reply Reply Quote 0
                          • A
                            asksameer @asksameer last edited by

                            @admin

                            Problem resolved. Thanks Admin, Yatish and Dotnet Support Team.

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

                              Hi @asksameer welcome.

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