Triggered stops

Possible OCO, OTO or OTOCO order? What I’d like to see is when stock price hits a certain threshold, that automatically a trailing stop or static stop order be created.

If this is possible using existing API, please let me know. I’ve not been able to figure out how.

Thank you!