Symptom
A GTC limit order submitted via UTA is marked rejected in order history while it is still alive at the broker (visible in the official Longbridge app). Another GTC order was marked rejected and later filled at its limit price with the fill completely invisible to UTA.
Reproduction / evidence
On a live Longbridge account (longbridge-c0a45adf), three GTC limit orders were pushed together on 2026-08-07 13:52 UTC:
| Order |
Limit |
UTA order-history |
Broker truth (direct SDK orderDetail) |
| ARM x2 |
$286.68 |
filled ✅ |
Filled (5) |
| NVDA x3 |
$218.99 |
rejected |
Filled (5) — filled later at limit |
| NET x1 |
$254.00 |
rejected |
NotReported (1) — still open |
Timestamps: the two spurious rejections were recorded at 2026-08-08 00:03/00:04 UTC, i.e. outside US equity trading hours.
Suspected subsystem
services/uta order sync: mapLbOrderStatus (longbridge-contracts.ts) maps Expired (16) → Inactive, and unreconcilePendingOrders (UnifiedTradingAccount.ts) treats any non-Submitted/PreSubmitted status as terminal — the order leaves the pending queue and is never re-observed. Longbridge marks US-equity GTC/GTD orders Expired between trading sessions (transient; reverts to New after reopen). Day orders are the only ones that truly expire at close.
Suggested fix
See PR #1125: disambiguate Expired via timeInForce — Day (1) stays Inactive (real expiry at close); GTC (2) / GTD (3) maps to Submitted so the sync poller keeps observing the order until it fills, cancels, or truly terminates.
Impact
State-machine divergence between UTA and broker: filled positions missing from UTA's view, phantom rejected orders, and the pending queue losing live orders. Reliable order status matters for anything automated on top of UTA (scheduled rebalances, monitoring).
Symptom
A GTC limit order submitted via UTA is marked
rejectedin order history while it is still alive at the broker (visible in the official Longbridge app). Another GTC order was marked rejected and later filled at its limit price with the fill completely invisible to UTA.Reproduction / evidence
On a live Longbridge account (longbridge-c0a45adf), three GTC limit orders were pushed together on 2026-08-07 13:52 UTC:
orderDetail)Timestamps: the two spurious rejections were recorded at 2026-08-08 00:03/00:04 UTC, i.e. outside US equity trading hours.
Suspected subsystem
services/utaorder sync:mapLbOrderStatus(longbridge-contracts.ts) mapsExpired(16) →Inactive, andunreconcilePendingOrders(UnifiedTradingAccount.ts) treats any non-Submitted/PreSubmittedstatus as terminal — the order leaves the pending queue and is never re-observed. Longbridge marks US-equity GTC/GTD ordersExpiredbetween trading sessions (transient; reverts toNewafter reopen). Day orders are the only ones that truly expire at close.Suggested fix
See PR #1125: disambiguate
ExpiredviatimeInForce— Day (1) staysInactive(real expiry at close); GTC (2) / GTD (3) maps toSubmittedso the sync poller keeps observing the order until it fills, cancels, or truly terminates.Impact
State-machine divergence between UTA and broker: filled positions missing from UTA's view, phantom rejected orders, and the pending queue losing live orders. Reliable order status matters for anything automated on top of UTA (scheduled rebalances, monitoring).