response of SmartWebSocketOrderUpdate in case of partial filled order


  • What will be the response of SmartWebSocketOrderUpdate in case of partial filled order, please give me the example


  • Hello @Munish-Bansal

    Case 1: After tranches are executed the quantity the kay filledshares and unfilledshares will changes after every execution and average price will recomputed and order status will remain open till the complete order is fulfilled.

    Case 2: Any portion of IOC order are can't be fill immediatly will be cancelled.

    Regards,
    SmartAPI Team


  • @Moderator_3 Thanks for your response.
    But I want to know the response of partial orders execution in different way..

    First example - Suppose I purchased the 100 quantity @Rs 12 and order is completed in following 3 steps. each step may have gap of few seconds or milliseconds.

    [Market price 12.00] Step 1: duration = "DAY", quantity = 100, filledshares = 30, unfilledshares = 70, averageprice = 12.00, orderstatus="open ?"
    [Market price 11.00] Step 2: duration = "DAY", quantity = 100, filledshares = (20 new + 30 [Step 1]) or (20 new), unfilledshares = ?, averageprice = ?, orderstatus="open ?"
    [Market price 10.00] Step 3: duration = "DAY", quantity = 100, filledshares = (50 new + 20 [Step 2] + 30 [Step 1]) or (50 new), unfilledshares = ?, averageprice = ?, orderstatus="completed"

    Second example
    [Market price 12.00] Step 1: duration = "IOC", quantity = 100, filledshares = 30, unfilledshares = 70, averageprice = 12.00, orderstatus="open or cancelled"
    Now will it execute the step 2 or not in case of duration = "IOC" ?
    [Market price 11.00] Step 2: duration = "IOC", quantity = 100, filledshares = (20 new + 30 [Step 1]) or (20 new), unfilledshares = ?, averageprice = ?, orderstatus="open or cancelled"
    [Market price 10.00] Step 3: duration = "IOC", quantity = 100, filledshares = ?, unfilledshares = ?, averageprice = ?, orderstatus="cancelled" if remaining portion is cancelled

    Please give me the Json format response of SmartWebSocketOrderUpdate api


  • Hello @Munish-Bansal

    {
    "user-id": "B210992",
    "status-code": "200",
    "order-status": "AB02",
    "error-message": "",
    "orderData": {
    "variety": "NORMAL",
    "ordertype": "LIMIT",
    "ordertag": "",
    "producttype": "CARRYFORWARD",
    "price": 19800.0,
    "triggerprice": 20000.0,
    "quantity": "50",
    "disclosedquantity": "0",
    "duration": "DAY",
    "squareoff": 0.0,
    "stoploss": 0.0,
    "trailingstoploss": 0.0,
    "tradingsymbol": "NIFTY26OCT23FUT",
    "transactiontype": "BUY",
    "exchange": "NFO",
    "symboltoken": "35079",
    "instrumenttype": "FUTIDX",
    "strikeprice": -1.0,
    "optiontype": "XX",
    "expirydate": "26OCT2023",
    "lotsize": "50",
    "cancelsize": "50",
    "averageprice": 0.0,
    "filledshares": "0",
    "unfilledshares": "50"
    ,
    "orderid": "230928000000481",
    "text": "",
    "status": "cancelled",
    "orderstatus": "cancelled",
    "updatetime": "28-Sep-2023 14:27:27",
    "exchtime": "28-Sep-2023 13:10:47",
    "exchorderupdatetime": "28-Sep-2023 14:26:39",
    "fillid": "",
    "filltime": "",
    "parentorderid": ""
    }
    }

    This is the response. here you will have two keys filledshares,unfilledshares .Based on this key you will able to know partial filled or not

    Regards,
    SmartAPI Team