Execute orders simulatneously

rajatg97
Hi Team, I want to understand if it is possible to place order as soon as we read the offer & depth. I tried executing (say i am arbitraging two instruments buying X & selling Y and i want to enter the trade when price difference (best bid for Y-best bid for X) is above certain limit, but when i actually place the order (after checking that condition is met) i do not get the required difference. I have implemented on NodeJs. What would be the best way to implement it, or if it is not possible to do this at all.
  • Imran
    Hi @rajatg97
    the logic you have posted above seems fine.
    What the the difference between the limit you were expecting and which you actually got?
    Although arbitrage algo is possible and not very difficult to implement.
  • rajatg97
    rajatg97 edited November 2021
    Hi @Imran thanks for quick response, i was expecting anything less than 56 points difference but got like 57, 58 on those lines (Instruments are NIFTY NOV FUT & NIFTY DEC FUT), i am placing market order (both buy and sell) after checking that my condition is met
  • Imran
    this difference is not too big to worry about. Also this is caused since you are placing market order.. If you do this by limit order this difference will never occur ( but that may also lead to partial execution of your pair)
  • rajatg97
    Yes, i need to place market orders to ensure both orders are completed successfully.
    Also can you provide any suggestions if possible to reduce the latency between checking the conditions & placing the orders, does the client being used makes any difference? like if i try same thing with python would it be faster
Sign In or Register to comment.