Open avrenli2 opened 1 month ago
@avrenli2 to check the latest status of an order after submitting, could you please use CLIENT.get_order_by_id(order_id= SELL_BITCOIN .id)
[1] to fetch the latest order info from server?
*1 https://alpaca.markets/sdks/python/api_reference/trading/orders.html#get-order-by-id
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