Navigation

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

    Important Update: Individual Order Status API using Unique Order ID (10 Requests/Second)

    General Discussion
    0
    16
    444
    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.
    • M
      milli @admin last edited by

      @admin

      Is there a comparable function that can be directly called ref. python api to get the order status ?

      thanks

      M 1 Reply Last reply Reply Quote 0
      • G
        godboleamit @trader_noob last edited by

        @trader_noob said in Important Update: Individual Order Status API using Unique Order ID (10 Requests/Second):

        uniqueorderid

        I agree to the question by @trader_noob. What's the difference between orderid and uniqueorderid. And when should we use uniqueorderid?

        R 1 Reply Last reply Reply Quote 0
        • R
          R236895 last edited by

          I am not login and order

          1 Reply Last reply Reply Quote 0
          • M
            Moderator_1 @gjs last edited by

            Hello @trader_noob, @godboleamit
            As @andyvoid has mentioned, it'll help in tracking modified orders. One more use case is fetching Individual Order Status. Earlier a user had to fetch the whole orderbook and check for their orders, now using the Individual Order Status API and Unique Order ID any user can track their orders instantly. Our main focus for introducing this was to provide a faster response time to order status which can be easily done now using the unique order ID parameter.
            @gjs thank you for suggesting this feature. We have noted this and will update you once it becomes available.
            If you still have any questions, please let us know.

            Thank you.

            Regards
            SmartAPI Team

            P 1 Reply Last reply Reply Quote 1
            • M
              Moderator_1 @milli last edited by

              Hello @milli,
              Yes, there is a function in the python library named "placeOrderFullResponse(orderparams)". Please look it up on our github repository.

              Thank you.

              Regards
              SmartAPI Team

              N 1 Reply Last reply Reply Quote 0
              • M
                Moderator_1 @rraavvi007 last edited by

                Hello @rraavvi007,

                Apologies for delayed response.
                Can you please share your request body? We usually don't have such unannounced maintenance activities.

                Thank you.

                Regards
                SmartAPI Team

                1 Reply Last reply Reply Quote 0
                • P
                  projectSB @Moderator_1 last edited by projectSB

                  @Moderator_1 Much awaited feature! Thanks!
                  Just need some more clarification:

                  Say I placed an order using "placeOrderFullResponse(orderparams)".

                  Now I can extract the uniqueOrderID from the response here. Now what do I do next to get the orderStatus from exchange?

                  Which Python function should I use to see whether my order was Completed or not?

                  A simple code block to illustrate this would be really appreciated!

                  UPDATE: I tried using normal requests (GET) to fetch the order status, but the response says 'Invalid token'.

                  {"success":false,"message":"Invalid Token","errorCode":"AG8001","data":""}

                  However, I can see that the order in the 'https://www.angelone.in/trade/orders/history'. Please help!

                  P 1 Reply Last reply Reply Quote 0
                  • P
                    projectSB @projectSB last edited by

                    @projectSB I figured it out!
                    Used the following method. Hope this help others too:

                    def individual_order_details(self, qParam):
                    url = self._rootUrl + self._routes["api.individual.order.details"] + qParam
                    try:
                    response_data = self.make_authenticated_get_request(url, self.access_token)
                    return response_data
                    except Exception as e:
                    logger.error(f"Error occurred in ind_order_details: {e}")
                    return None

                    1 Reply Last reply Reply Quote 0
                    • N
                      N399438 @Moderator_1 last edited by

                      @Moderator_1 said in Important Update: Individual Order Status API using Unique Order ID (10 Requests/Second):

                      placeOrderFullResponse

                      I am etting below error
                      'SmartConnect' object has no attribute 'placeOrderFullResponse'

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        Moderator_3 @N399438 last edited by

                        @N399438 said in Important Update: Individual Order Status API using Unique Order ID (10 Requests/Second):

                        placeOrderFullResponse

                        Hello @N399438,

                        try:
                        orderparams = {
                        "variety": "NORMAL",
                        "tradingsymbol": "SBIN-EQ",
                        "symboltoken": "3045",
                        "transactiontype": "BUY",
                        "exchange": "NSE",
                        "ordertype": "LIMIT",
                        "producttype": "INTRADAY",
                        "duration": "DAY",
                        "price": "19500",
                        "squareoff": "0",
                        "stoploss": "0",
                        "quantity": "1"
                        }
                        # Method 1: Place an order and return the order ID
                        orderid = obj.placeOrder(orderparams)
                        logger.info(f"PlaceOrder : {orderid}")
                        # Method 2: Place an order and return the full response
                        response = obj.placeOrderFullResponse(orderparams)
                        logger.info(f"PlaceOrder : {response}")
                        except Exception as e:
                        logger.exception(f"Order placement failed: {e}")

                        Thank you.

                        Regards
                        SmartAPI Team

                        1 Reply Last reply Reply Quote 0
                        • R
                          Rakhi @godboleamit last edited by

                          @godboleamit

                          orderid is just like your roll number (consider student as an order, when he moves up from one class to next class, his roll number gets changed, but his enrollment number remain same)

                          UniqueOrderId is the super-level id by which you can track all the modification histry related to that order.

                          OrderId is for the individual event with that order, and with that you can track only the single modification history.

                          thanks

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