The way I do it is I have a dummy flag in my order placement code. If that flag is set it does everything but actually send the order to zerodha. I have my own orders and positions maintained at my end and therefore the code can do everything it would do with a live order like track MTM, charges, target and exit the position when the price hits stoploss or target as per the relevant strategy.
In fact I dont look at/use zerodha's positions/quote/orders api calls at all.
All testing is done at local where the dummy flag is set by default. All live trading is done on AWS where the dummy flag is not set at all. So there is no chance of mixing up testing and live trading.
In fact I dont look at/use zerodha's positions/quote/orders api calls at all.
All testing is done at local where the dummy flag is set by default.
All live trading is done on AWS where the dummy flag is not set at all.
So there is no chance of mixing up testing and live trading.