live.orders filters and force = True appears broken
Hi,
If I add any filters or apply force = True to the live.orders I get an empty dictionary back. This doesn't happen when no filters or force isn't applied. Is there a way this can be fixed? This is quite important as force = True will not return a cached result, which can be a huge issue.
import logging
from ibind import IbkrClient
# Set up logging so that debug messages are visible
logging.basicConfig(level=logging.DEBUG)
def debug_live_orders():
# Initialize the IB client (adjust port if needed)
client = IbkrClient(port=5007)
# Call live_orders with force=True to refresh orders data
response = client.live_orders(force=True)
# Output the live orders data using the debug logger
logging.debug("Live Orders (forced): %s", response.data)
if __name__ == "__main__":
debug_live_orders()
Many thanks!
If I add any filters or apply force = True to the live.orders I get an empty dictionary back.
Hi, this is normal behaviour, documented here:
- CPAPI: https://www.interactivebrokers.com/campus/ibkr-api-page/cpapi-v1/#live-orders
- WebAPI: https://www.interactivebrokers.com/campus/ibkr-api-page/webapi-ref/#tag/Trading-Orders/paths/~1iserver~1account~1orders/get
As I understand it, after making a 1st request with force=True, you need to follow-up with force=False to obtain your data. Does this help?
Hi, thanks for getting back to me. I will try that later, thanks. Do the filters work for you? I have the same issue with these, they just come back blank.
Do the filters work for you? I have the same issue with these, they just come back blank.
I have never tried filters, can't say.
I can't get the filters to work and whether the force = True is actually working I'm not sure either.. . I have problems where the system seemingly omits exiting orders
I can't get the filters to work and whether the force = True is actually working I'm not sure either.. . I have problems where the system seemingly omits exiting orders
I remember a past issue #43 where another user seemed to experience the same, especially outside RTH. Not sure there is a solution, but there's one or two possible workarounds. Might any of that be helpful?
hey @SibbiSibbi I've been seeing live orders returning an empty array too. I'd suggest addressing this with IBKR support. Also, are you executing the pre-flights as noted here: https://github.com/Voyz/ibind/wiki/Advanced-REST#-list-of-pre-flights
Hey, thanks for getting back to me. Yes, I'm doing the preflights but I find the live.order endpoint super unreliable, it's hard to pinpoint, I think it might be caching that does not clear even though I have the force = True preflight.
Ok, thanks for reporting back on the preflights. Yeah, I'd suggest you talk to IBKR about this
@SibbiSibbi were you able to resolve this?
I wonder if https://github.com/Voyz/ibind/issues/105 could help address this.
I'm going to close this due to inactivity. Thanks for the contribution so far, feel free to let me know if you'd like it reopen and continue the discussion 👍