How to calculate Fill Rate in ib_insnyc (python)?

Viewed 8

I'm trying to calculate my fill rate at the end of the day, with the calc of orders sent divided by trades. the problem is when i send bracket order it is divided into 3 trades, on for limit, one for stop loss and one for take profit, while some of the get cancelled when the other one get executed. I have also orders that I cancel automatically after some time if they haven't been executed.

When I send ib.orders() I get all the orders of the day. how can I get only the orders that haven't been filled because I tried to buy but couldn't get them and they got cancelled?

0 Answers
Related