order book API response vs purchase API


  • @admin - let me know an accurate method to identify if an order will further execute or not


  • @admin I am placing order and then looking at trade book API to find the fillsize of all with same order ID. But I am not able to make a call if an order if completely executed or not in case of partial execution. I am currently waiting for 15sec before checking the trading book.

    I am sure there will be a ttl (time to live) will when a purchase order can get executed as no one can wait for long for an order to finalize.

    Also is there a way to set a timer within which order has to execute after placing


  • HI @ronak said in order book API response vs purchase API:

    I need to know when the order is fully or partially executed and there going to be no further partial execution using the trade book API. Please guide me the best way. Is there a order Time to LIVE ?

    This logic has to be implemented by the end user.
    You can keep a track of total quantity you want to execute in a variable and try to compare the order id and the fill size till it get completely filled.
    Note : Also You can find an optimize way to do this above is one of the logic that can be implemented to keep a check if the order is filled completely or partially.


  • @admin - After placing a Delivery order at latest market price, how long (max) do we need to wait before the order gets executed completely?

    I need to know when the order is fully or partially executed and there going to be no further partial execution using the trade book API. Please guide me the best way. Is there a order Time to LIVE ?


  • HI @ronak From the response itself we can interpret that order id are same for all partial executions.


  • @ronak said in order book API response vs purchase API:

    210709000367264
    7f956ded-9ee9-459e-9a39-28b51ace1731-image.png ![alt text](image url)


  • @admin
    Response from the Purchase oder API while SELLING: {'status': True, 'message': 'SUCCESS', 'errorcode': '', 'data': {'script': 'PIONDIST', 'orderid': '210709000367264'}}

    Order book API ---
    {'exchange': 'BSE', 'producttype': 'DELIVERY', 'tradingsymbol': 'PIONDIST', 'instrumenttype': '', 'symbolgroup': 'B', 'strikeprice': -1.0, 'optiontype': '', 'expirydate': '', 'marketlot': '1', 'precision': '2', 'multiplier': '-1', 'tradevalue': 131.0, 'transactiontype': 'SELL', 'fillprice': 131.0, 'fillsize': '1', 'orderid': '210709000367264', 'fillid': '20255800', 'filltime': '11:20:06'}, {'exchange': 'BSE', 'producttype': 'DELIVERY', 'tradingsymbol': 'PIONDIST', 'instrumenttype': '', 'symbolgroup': 'B', 'strikeprice': -1.0, 'optiontype': '', 'expirydate': '', 'marketlot': '1', 'precision': '2', 'multiplier': '-1', 'tradevalue': 262.1, 'transactiontype': 'SELL', 'fillprice': 131.05, 'fillsize': '2', 'orderid': '210709000367264', 'fillid': '20255300', 'filltime': '11:20:06'}, {'exchange': 'BSE', 'producttype': 'DELIVERY', 'tradingsymbol': 'PIONDIST', 'instrumenttype': '', 'symbolgroup': 'B', 'strikeprice': -1.0, 'optiontype': '', 'expirydate': '', 'marketlot': '1', 'precision': '2', 'multiplier': '-1', 'tradevalue': 262.0, 'transactiontype': 'SELL', 'fillprice': 131.0, 'fillsize': '2', 'orderid': '210709000367264', 'fillid': '20255600', 'filltime': '11:20:06'}, {'exchange': 'BSE', 'producttype': 'DELIVERY', 'tradingsymbol': 'PIONDIST', 'instrumenttype': '', 'symbolgroup': 'B', 'strikeprice': -1.0, 'optiontype': '', 'expirydate': '', 'marketlot': '1', 'precision': '2', 'multiplier': '-1', 'tradevalue': 1310.0, 'transactiontype': 'SELL', 'fillprice': 131.0, 'fillsize': '10', 'orderid': '210709000367264', 'fillid': '20255500', 'filltime': '11:20:06'},

    As you can see , why there are multiple record in the order book for same purchase? Also, for any purchase order ID, does the order ID remain same for all partial execution (as above)


  • Hi @ronak post your response here for first purchase order id and partially executed order ids.


  • @admin I am aware of that. Question is - How to identify all the orderIDs in orderbook() related to a purchase orderID. Because I am seeing multiple orderID in orderbook() for one purchase made by me. This may be due to partial execution of a buy/sell order creating multiple orderIDs in orderbook().

    Please read carefully and provide a detail answer.


  • HI @ronak Use orderbook() to fetch all orders.