-
Notifications
You must be signed in to change notification settings - Fork 27
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
Live Order Not Retrieved #43
Comments
I also noticed this - after RTH this just happens, I don't know why. I'd recommend you get in touch with IBKR support and ask them directly |
IBKR docs state that with |
@salsasepp well spotted, although sadly in my experience using force=True followed by force=False after hours still doesn't provide expected results |
I'll soon be in a position to test this and make sad experiences myself... ;-) The fact that a parameter like |
@salsasepp yupp. The good news is, that during market open hours this doesn't seem to be an issue, or if it is, it's very infrequent. |
From what I can tell, orders are being sent to IB / exchange just fine. Retrieving them works sporadically, something to do with timing (RTH vs extended hours), caching etc. |
After playing with it some, I think placing the following code immediately after a buy / sell / cancel / modify order API call, gets rid of the order retrieval issues. client.live_orders(filters, force=True) |
Another solution that seems to help is to proactively refresh the cache. I tried two options - the iBind function and restarting the script using os.system().
But we do not know the root cause of the issue and these are all hacks. |
I was able to place an order using iBind after RTH during extended hours. Pointing my browser to iserver/account/orders displays it with status:"Submitted". The buy price is too low, so I know it won't get filled.
When trying to retrieve it, the following returns an empty list []. I've tried it both with and without 'account_id':
filters = ['Submitted']
client.live_orders(filters, force=True, account_id='my paper account id')
Any idea what could be going on?
The text was updated successfully, but these errors were encountered: