Hello,
?
i am using a basic scanner, that is repeated in a loop:
? ? ? ? ? ? ? ? if ENABLE_BUYING and ((is_premarket() and PREMARKET_ONLY) or not PREMARKET_ONLY):
? ? ? ? ? ? ? ? ? ? scan_sub = ScannerSubscription(
? ? ? ? ? ? ? ? ? ? ? ? instrument='STK',
? ? ? ? ? ? ? ? ? ? ? ? locationCode='STK.US.MAJOR',
? ? ? ? ? ? ? ? ? ? ? ? scanCode='TOP_PERC_GAIN'
? ? ? ? ? ? ? ? ? ? )
? ? ? ? ? ? ? ? ? ? scan_results = ib.reqScannerData(scan_sub)
? ? ? ? ? ? ? ? ? ? scan_results = scan_results[:10] ?# Limit to top 10 results
Everything works fine, but my terminal gets flooded with this error:
Error 162, reqId 33346: Historical Market Data Service error message:API scanner subscription cancelled: 33346
?
They only mention of this error in the docs is that you can ignore it. I found other posts in the TWSAPI group, but they also dont know how to fix it.?
?
Any suggestions?