Navigation

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

    PlaceOrder API gives blank output

    Python SDK
    2
    21
    66
    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
      admin @VIJAY KADTAN last edited by

      @VIJAY-KADTAN
      request:
      {
      "variety":"NORMAL",
      "tradingsymbol":"BANKNIFTY26AUG2132500PE",
      "symboltoken":"50616",
      "transactiontype":"BUY",
      "exchange":"NFO",
      "ordertype":"MARKET",
      "producttype":"CARRYFORWARD",
      "duration":"DAY",
      "quantity":"25"
      }

      res:
      {
      "status": true,
      "message": "SUCCESS",
      "errorcode": "",
      "data": {
      "script": "BANKNIFTY26AUG2132500PE",
      "orderid": "210825000000026"
      }

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

        Hi @VIJAY-KADTAN It is working fine at our end as posted above the requests and the response.

        V 1 Reply Last reply Reply Quote 0
        • V
          VIJAY KADTAN @admin last edited by

          @admin Your request shown not looks in Python..Which language should use?

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

            HI @VIJAY-KADTAN We tested it in postman.

            V 1 Reply Last reply Reply Quote 0
            • V
              VIJAY KADTAN @admin last edited by

              @admin Please test in Python and replay. I tried today again its still not working..

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

                HI @VIJAY-KADTAN ok

                A V 2 Replies Last reply Reply Quote 0
                • A
                  admin @admin last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • V
                    VIJAY KADTAN @admin last edited by

                    @admin From where to download SmartConnect lib

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

                      HI @VIJAY-KADTAN said in PlaceOrder API gives blank output:

                      @admin From where to download SmartConnect lib
                      Kindly go through below thread.
                      https://github.com/angelbroking-github/smartapi-python

                      V 1 Reply Last reply Reply Quote 0
                      • V
                        VIJAY KADTAN @admin last edited by

                        @admin i am now trying SmartConnect
                        Give following output

                        Exception while retriving IP Address,using local host IP address HTTPSConnectionPool(host='api.ipify.org', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001D846B5A130>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))
                        This is my feedtoken:: 0931788167
                        {'status': True, 'message': 'SUCCESS', 'errorcode': '', 'data': {'clientcode': 'V187845', 'name': 'VIJAY KADTAN', 'email': '', 'mobileno': '', 'exchanges': ['bse_cm', 'cde_fo', 'nse_cm', 'nse_fo', 'mcx_fo', 'ncx_fo'], 'products': ['BO', 'NRML', 'CO', 'CNC', 'MIS', 'MARGIN'], 'lastlogintime': '', 'broker': ''}}

                        Here output windows first take some time 3-4 sec..then show error and then sow output..

                        My code is

                        from smartapi import SmartConnect
                        ####generate session #####

                        obj =SmartConnect(api_key="1GjVLyP9")

                        login = obj.generateSession('V187845', 'xxxxxxxx')

                        refreshToken = login['data']['refreshToken']

                        feedToken = obj.getfeedToken()

                        print ("This is my feedtoken::",feedToken)

                        userProfile= obj.getProfile(refreshToken)

                        print (userProfile)


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

                          Hi @VIJAY-KADTAN As seen through remote access(anydesk) the code form our end seems to be working fine you need to debug code from your end.

                          V 1 Reply Last reply Reply Quote 0
                          • V
                            VIJAY KADTAN @admin last edited by

                            @admin pls at least solve this issue of Max retries
                            Exception while retriving IP Address,using local host IP address HTTPSConnectionPool(host='api.ipify.org', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001D846B5A130>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))

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

                              HI @VIJAY-KADTAN Kindly follow below thread for correct codes:
                              https://smartapi.angelbroking.com/topic/1194/basic-smartapi-integration-using-python

                              V 1 Reply Last reply Reply Quote 0
                              • V
                                VIJAY KADTAN @admin last edited by

                                @admin Todays somes automatic entries appear in my order book.
                                SBIN BUY @425
                                I am not hitting or testing any API. Is you do some testing from your side..Pls clear.
                                It happens 3-4 days before also..

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

                                  HI @VIJAY-KADTAN Please reset your password.

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