-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Order filled status is not displayed #509
Comments
@avrenli2 to check the latest status of an order after submitting, could you please use *1 https://alpaca.markets/sdks/python/api_reference/trading/orders.html#get-order-by-id |
I think the point is that it would make more sense to return an order object that contains all the information rather than something empty. Especially for IOC and FOK orders, there shouldn't be a need to make a second call for order information because they should be resolved by the return of the first call. |
The submission API is designed to have async capability. We returns response from the submission API endpoint as ack of the order submission which does not necessarily to communicate with market and not much uncertainness (i.e. when we can get the consequence of the order from market). There is a websocket-stream to receive trade event. When status is updated for orders, you could receive the status changes via the stream. |
That doesn't make sense because if it is intended to be used as an asynchronous call, it should not return a response until the order has resolved server side while the client side code can continue on. However, because a response is immediately returned, this means in practice a follow up call is necessary to know whether the order has been filled, and then take subsequent actions (but could still be wrong) In ny case, because IOC also doesn't support multileg orders, it means pinging the server to check all submitted orders and placing my own multilegs, which again creates more inefficient execution and possibly race conditions between server and client. It would helpful if orders were truly async and in the case of IOC and FOK, to publish the max duration until timeout, since it's not actually instant. |
Thank you for your input. Understand what you meant. I assume similar to AJAX way of asynchronous (long waiting while processing other in client-side). And noted the feature request. It might be lacking of my explanation/choice about the wording |
Is there an existing issue for this?
Current Behavior
When I place a sell order, I would like to check if the sell order is filled or not.
But when paper trading, the filled_at attribute of the order remains None and is not updated.
For instance, I place an order for buying Bitcoin:
After buying the asset, I submit a sell order:
As seen, this prints the filled_at attribute as:
filled_at': None
How do we check if an order is filled or not?
Expected Behavior
When you run the following code with your API keys, the filled_at attribute of SELL_BITCOIN must differ from None. However, it remains None even after the order is filled. How do we trace if the order is filled or not?
Why is the filled_at attribute of SELL_BITCOIN None?
SDK Version I encountered this issue in
alpaca-py 0.30.1
Steps To Reproduce
Run the following code with your API keys:
Why is the filled_at attribute of the sell order None?
Filled out the Steps to Reproduce section?
Anything else?
No response
The text was updated successfully, but these errors were encountered: