erdewit / ib_insync

Python sync/async framework for Interactive Brokers API
BSD 2-Clause "Simplified" License
2.75k stars 723 forks source link

OrderId .... that needs to be cancelled is not found. #656

Closed ppokhare closed 5 months ago

ppokhare commented 7 months ago

I am seeing this error "OrderId .... that needs to be cancelled is not found." through out my logs. What are the reasons for this error?

I first see the order 15073 was filled at 1:32:54: 2023-11-10 10:32:54,154 ib_insync.wrapper ERROR Error 10148, reqId 15073: OrderId 15073 that needs to be cancelled cannot be cancelled, state: Filled.

then I continue to see the following through out my run: 2023-11-10 10:34:16,598 ib_insync.wrapper ERROR Error 10147, reqId 15073: OrderId 15073 that needs to be cancelled is not found. .... 2023-11-10 10:35:46,912 ib_insync.wrapper ERROR Error 10147, reqId 15073: OrderId 15073 that needs to be cancelled is not found. ....

I am sending orders onPendingTicker() and canceling next seconds but the ib.openOrders() list is keep on growing to cancel the order which is problematic.

cgntiger commented 6 months ago

会不会是订单成交,或者手动取消了,然后你的程序又去取消它?

ppokhare commented 6 months ago

not exactly sure what's going on. I am not doing anything manually.

right now I am creating my own queue and processing order id.