Navigation

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

    Modify order for sell

    Python SDK
    2
    13
    110
    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.
    • D
      darshan @admin last edited by

      This post is deleted!
      A 1 Reply Last reply Reply Quote 0
      • A
        admin @darshan last edited by

        HI @darshan We will test it and update you.

        D 2 Replies Last reply Reply Quote 0
        • D
          darshan @admin last edited by

          @admin Ok Thank you

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

            @admin

            @admin 
            Request -
            
            from smartapi import SmartConnect
            
            exchange = "NSE"
            tradingsymbol = "NHPC-EQ"
            symboltoken = "17400"
            variety = "NORMAL"
            ordertype = "LIMIT"
            producttype = "INTRADAY"
            duration = "DAY"
            squareoff = "0"
            stoploss = "0"
            quantity = 1
            
            
            def selling(current_price, orderid):
                orderparams = {
                    "variety": variety,
                    "orderid": orderid,
                    "ordertype": ordertype,
                    "producttype": producttype,
                    "transactiontype": "SELL",
                    "duration": duration,
                    "price": current_price,
                    "quantity": quantity,
                    "tradingsymbol": tradingsymbol,
                    "symboltoken": symboltoken,
                    "exchange": exchange
                }
            
                orderresponse = obj.modifyOrder(orderparams)
                return orderresponse
            
            
            
            data = obj.ltpData(exchange, tradingsymbol, symboltoken)
            current_price = data['data']['ltp']
            
            orderid = '210823000463560'
            orderresponse = selling(current_price, orderid)
            print("Selling order response: {}".format(orderresponse))
            
            * Response -
            

            Selling order response: {'status': True, 'message': 'SUCCESS', 'errorcode': '', 'data': {'orderid': '210823000463560'}}

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

              @admin Please let me know what I missed

              1 Reply Last reply Reply Quote 0
              • D
                darshan @darshan last edited by

                @darshan Hi @admin Please let me know if any update.

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

                  @admin Can you please help with this.

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

                    HI @darshan we will definately help you out we appreciate your patience we will update you with correct request soon.

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

                      @admin Thank you

                      1 Reply Last reply Reply Quote 0
                      • D
                        darshan @darshan last edited by

                        @darshan Thank you so much Yatish for your help.

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