You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a posted limit order to buy an equity. Polling orders and positions endpoints every second reveals an issue:
Get orders will return data on my order, showing it is still active (not filled), at the same time, get positions will return data showing I have an active position in that equity (1 qty).
Now, it seems that the API is telling me my order is not filled, but the positions endpoint is showing I have inventory, so obviously the order has been filled.
If you try to sell that position, you get an error of insufficient quantity (which is funny because the API also tells me I have inventory).
Sometimes this lag between the orders and positions data continues for 10 seconds.
I assume you have some kind of auto-mated order management on your side to call APIs.
Please make sure there are overlapping orders (i.e. multiple orders for the same symbol) or not.
Those orders in-flight could consume available qty in the position.
You could also check qty_available field in the response of Positions API for the actual available position at the time.
If you are facing similar issue still, please reach our support team with account/order id information so we can look at the order request information https://alpaca.markets/contact
Activity
hiohiohio commentedon Jun 12, 2025
@AlekseyUrmanov thank you for the report.
I assume you have some kind of auto-mated order management on your side to call APIs.
Please make sure there are overlapping orders (i.e. multiple orders for the same symbol) or not.
Those orders in-flight could consume available qty in the position.
You could also check
qty_availablefield in the response of Positions API for the actual available position at the time.If you are facing similar issue still, please reach our support team with account/order id information so we can look at the order request information https://alpaca.markets/contact