td-ameritrade-client
td-ameritrade-client copied to clipboard
Order.getStatus() returns null
Immediately after calling client.placeOrder() a call to order.getStatus returns null. This is unexpected. Shouldn't it return a Status instance? The call to placeOrder() places an order and seems to work as expected.
Yeah. That’s how it works in the integration tests. Can you try and sleep for a few seconds and then call the getStatus? Maybe TDA has a synchronization delay between their internal servers.
On Tue, Jul 7, 2020, at 07:30, FreeGoldRush wrote:
Immediately after calling client.placeOrder() a call to order.getStatus returns null. This is unexpected. Shouldn't it return a Status instance? The call to placeOrder() places an order and seems to work as expected.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/studerw/td-ameritrade-client/issues/20, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQHJA42L2QXGD2LO4CDVE3R2MIOXANCNFSM4OSYR2BQ.
@FreeGoldRush Did the sleeping for a few seconds solve your problem?
Sorry, have not tried it yet. Sleeping isn't an option. I'll probably just create a Thread that checks order status every 250 ms or something until it gets a valid value.