Hi,
During the overnight trading session, one of my partially filled orders were returned as Canceled in the Get All Orders API but was seen as partially filled on my account dashboard, this disparity caused my system to repeatedly send sell orders and got rejected due to insufficient quantity, I had to manually delete the order on the dashboard at around 10:20PM EST to fix it. The said order id: 6aff95e1-d2e7-40f7-9f36-09e4d56975ba, @Dan_Whitnable_Alpaca
I really would like to know how much value have I got
@ghostblade1982 Below is the sequence of events I can piece together from the Alpaca logs. You stated that you deleted the order from the dashboard around 10:20 PM EST. I see a log entry at 10:24 PM PDT (ie not ET). I assume you meant Pacific time? Let me know if that is not correct.
All the times below are in PDT. References are to order number 6aff95e1-d2e7-40f7-9f36-09e4d56975ba.
17:09:00.875 Created order - status: accepted
17:09:00.876 Submitted order - status: pending_new
17:09:00.879 Submitted order confirmed - status: new
17:37:12.518 Filled quantity 40 - status: partially_filled
21:38:22.006 ----
Posted 133 SELL orders for SERV all rejected for "insufficient qty"
22:24:40.725 ----
22:24:42.822 Cancel requested - status: pending_cancel
22:24:42.824 Cancel order - status: cancelled
I don’t have access to the actual payload you would have received when requesting orders. The status shown above is the order’s status each time it was updated in the orders database. The fetch orders API queries this database and would have (should have) returned that status.
What are you seeing that makes you believe order number 6aff95e1-d2e7-40f7-9f36-09e4d56975ba returned a canceled status any time before it was actually canceled at 22:24:42.824?
@Dan_Whitnable_Alpaca Apologies, yes I canceled the order at around 10:20PM PST, so the time you saw was correct.
The reason I’m certain that the status was returned as ‘canceled’ was because after I saw the disparity between my system and alpaca dashboard, I eventually restarted my system, which would effectively clean up all the cached status and only reload orders from the Get All Orders API, but the order ‘s status was still canceled. So that’s definitely not some bug in my system that caused outdated status.
@Dan_Whitnable_Alpaca were you able to find any trace? This is a big problem if it’s caused by some bug because it means the source of truth can’t even be trusted.
@ghostblade1982 The Engineering Team hasn’t been able to replicate the issue you are seeing, and it hasn’t been reported by any other users. Please follow up here if you see this issue again.
@Dan_Whitnable_Alpaca I just saw another example of the order status discrepancy with proof, attached is the screenshot I just took on my alpaca account dashboard, this order is currently shown as new but it was returned as canceled from my Get All Orders API, please help investigate
OrderId: 5d7fe040-bc24-451d-9844-834e1f494f15
@Dan_Whitnable_Alpaca Was this looked at by the engineering team?