I am testing a personal U.S. equities system using an Alpaca paper account and need to understand the supported order lifecycle before running a controlled test.
The intended order is a BUY limit entry, DAY time-in-force, OTO order class, with a stop-loss child only (no take-profit leg). A filled position may be held overnight.
Alpaca’s current API and alpaca-py schemas expose one time_in_force on the OTO request, while StopLossRequest contains only stop_price and optional limit_price. The documentation also indicates that the attached exit order is not activated until the entry is completely filled.
That leaves three implementation questions.
Question 1: If the DAY entry partially fills, can a separate standalone GTC sell-stop be submitted for exactly the currently filled quantity while the unfilled remainder of the BUY order remains open?
Question 2: If additional shares subsequently fill, what is the supported race-safe workflow for increasing the protective-stop quantity, without leaving filled shares unprotected, without submitting a sell quantity greater than the actual position, without preventing the remaining BUY quantity from filling, and without creating duplicate stop orders? Should the existing standalone stop be replaced, or must it be canceled and resubmitted? Which trade_updates events and order fields should be reconciled before proceeding?
Question 3: Is this behavior and workflow identical in Alpaca paper and live U.S. equities trading?
If no gap-free supported workflow exists for this combination, that would also be useful to confirm explicitly.
I am looking for broker/API mechanics, not trading or investment advice. No order has been submitted for this question. An Alpaca staff response or a reproducible API sequence would be greatly appreciated.