API for KILL SWITCH Feature?

yeshwanth
I need to disable trading as soon as portfolio SL is hit on the account in a particular day.
So, is there API for kill switch feature?
if not, anyway to disable trading using code by exiting all open positions once portfolio SL is hit.
This discussion has been closed.