Pin-risk liquidation closes one leg of a multi-leg combo position without the paired leg
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 398
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 6
Description
On 2026-08-28, I had an open WMT bear call spread (short WMT260828C00103000 / long WMT260828C00104000, opened via a single MLEG order). Near
At 3:30pm ET on expiration day, Alpaca's risk system closed only the short leg via a SIMPLE market order, leaving the long leg open as an orphaned, unpaired position.
- Order ID: e92f76c0-9c4c-4d97-9bcf-47e4cc904b88
- Filled: 2026-08-28 19:30:34 UTC, BUY 9 @ $0.06
- Order class: SIMPLE (not MLEG, despite the position originating from a combo order)
This appears related to the documented pin-risk liquidation process starting at 3:30pm ET on expiry day.
Does this process check whether a leg belongs to an existing multi-leg/combo position before liquidating it individually?
If not, this seems like a gap — the liquidation reduces the account's risk on one leg while leaving the other leg's risk fully intact, which can leave the account in a worse position than before the intervention.
Either the pin risk should close both legs or leave both.
Ideal would be an option to set the expectation at the time of the order.
It seems like Alpaca is managing my exact strategy inappropriately
Contributor guide
Research direction
The report identifies an Alpaca pin-risk liquidation event involving an MLEG bear call spread and a SIMPLE order, but names no repository file, test, or SDK entry point. Start by determining whether this behavior is controlled by alpaca-py or the remote trading API, then establish whether combo-leg relationships and liquidation expectations are exposed; done requires a confirmed scope and an agreed behavior for paired legs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend-api-design
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100