开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Scanner sometimes blocks forever


 

Still quite new to this API so hopefully making a silly error...

This code worked out of hours:

topPercentLoserListed = ScannerSubscription(instrument='STK', locationCode='STK.US.MAJOR', numberOfRows=2,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?scanCode='TOP_PERC_LOSE', abovePrice='5', aboveVolume='500000')
bot = ib.reqScannerData(topPercentLoserListed)

...but tried running it now and it just blocks forever. Anyone experienced this?

The same but with TOP_PERC_GAIN works fine.
Although there is an error message after it runs:?Error 162, reqId 67980: Historical Market Data Service error message:API scanner subscription cancelled: 67980

Is this because I'm doing something wrong?

Thanks Nick


 

I narrowed the problem down to?STK.NASDAQ.NMS

Although seems OK.

I had to sign an updated market data agreement today - coincidence?

(By the way, I am using ib_insync)


On Mon, Nov 18, 2019 at 5:32 PM NickW via Groups.Io <njwalczak=[email protected]> wrote:
Still quite new to this API so hopefully making a silly error...

This code worked out of hours:

topPercentLoserListed = ScannerSubscription(instrument='STK', locationCode='STK.US.MAJOR', numberOfRows=2,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?scanCode='TOP_PERC_LOSE', abovePrice='5', aboveVolume='500000')
bot = ib.reqScannerData(topPercentLoserListed)

...but tried running it now and it just blocks forever. Anyone experienced this?

The same but with TOP_PERC_GAIN works fine.
Although there is an error message after it runs:?Error 162, reqId 67980: Historical Market Data Service error message:API scanner subscription cancelled: 67980

Is this because I'm doing something wrong?

Thanks Nick


 

Is this a benign error message ??
I seem to be getting the scanner results back...

Error 162, reqId 1892024: Historical Market Data Service error message:API scanner subscription cancelled: 1892024