Applied Quants is currently testing a separate Alpaca Trading API client in PAPER, not a funded live account and not a LEAN deployment. We are interested in practical reconciliation patterns from the LEAN/Alpaca integration community, while keeping those implementation differences explicit.
We reviewed “Self.liquidate() does not work 5 minutes before market close”: https://www.quantconnect.com/forum/discussion/19276/self-liquidate-does-not-work-5-minutes-before-market-close/p1
The posted chronology submits a replacement exit before the previous stop's terminal cancellation update. In April 2026 the original author confirmed that sequential operations and careful cancel-status checks resolved it. We do not take the earlier automated response's proposed five-minute broker cutoff as verified policy.
Building on that resolution, is there a current minimal event/state example or integration test covering partial entry fills, cancellation of the unfilled remainder, and protective-exit resizing when a fill races cancellation? What broker evidence does it use before a replacement exit relies on the released closing-share reservation? We are looking for the actual reconciliation sequence rather than a fixed delay after requesting cancellation.
Current Alpaca documentation describes quote/NBBO-based simulated fills (https://docs.alpaca.markets/us/docs/paper-trading), and a staff forum response described additional PAPER latency near the open (https://forum.alpaca.markets/t/consistant-6-30am-6-35am-unfilled-marketable-paper-trade-orders/19416). We want to distinguish simulator limitations from client ownership/state defects. We have no live execution evidence yet.
Applied Quants
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!