¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

No response from scanner


 

tl;dr: My calls to reqScannerSubscription arrive at TWS fine, but no data or error is returned.

(Note: I am puzzled why this was originally rejected. I do not believe this to be a golang problem and I've already translated the very few implementation details to use the terms in the TWS API docs.)

Hello,

I'm trying to set up a simple scanner (MOST_ACTIVE_AVG_USD) via a golang implementation of the TWS API. Late last week, I briefly had a few successful scanners running; this week, I'm getting no response back.

I don't just mean "no data" -- I would expect a scannerDataEnd response in that case -- I mean, nothing at all comes back. No data, no scannerDataEnd, no error, nothing.

The request is certainly reaching TWS; the scanner can be cancelled perfectly fine, and sending an incorrect request (e.g., with a bad scan code) does provoke an error. Other requests can be handled while the scanner is sitting there.

I see this in the client log:
> 14:34:48:024 <- 22-4-20-STK-STK.US.MAJOR-MOST_ACTIVE_AVG_USD--------------0------

but then nothing afterwards.

Any suggestions about what might be going wrong? I'm grateful for any help, and happy to fill in any details I've missed.

C


 

Did you run It on weekend or holiday??


On Mon, Jun 12, 2023, 5:22 PM <unclekensson@...> wrote:
tl;dr: My calls to reqScannerSubscription arrive at TWS fine, but no data or error is returned.

(Note: I am puzzled why this was originally rejected. I do not believe this to be a golang problem and I've already translated the very few implementation details to use the terms in the TWS API docs.)

Hello,

I'm trying to set up a simple scanner (MOST_ACTIVE_AVG_USD) via a golang implementation of the TWS API. Late last week, I briefly had a few successful scanners running; this week, I'm getting no response back.

I don't just mean "no data" -- I would expect a scannerDataEnd response in that case -- I mean, nothing at all comes back. No data, no scannerDataEnd, no error, nothing.

The request is certainly reaching TWS; the scanner can be cancelled perfectly fine, and sending an incorrect request (e.g., with a bad scan code) does provoke an error. Other requests can be handled while the scanner is sitting there.

I see this in the client log:
> 14:34:48:024 <- 22-4-20-STK-STK.US.MAJOR-MOST_ACTIVE_AVG_USD--------------0------

but then nothing afterwards.

Any suggestions about what might be going wrong? I'm grateful for any help, and happy to fill in any details I've missed.

C


 

I did, but it behaves the same way during RTH as well.


 

The scanner you describe is pretty basic and works just fine within our framework (based on the Java API) as well as with the two sample API clients IBKR ships with the API:
  • The C# client IBSampleApp.exe for Windows
  • The Java based client ApiDemo.jar that works on all operating systems

It takes about 500ms for TWS to send the first block of 20 results right after subscription, and subsequent updates get sent approximately every 30 seconds after that.

Why don't you try and get a "second opinion" from one of the demo clients. That way, you'd know whether the issue is with your TWS/IBGW or your own client.

´³¨¹°ù²µ±ð²Ô

ScannerSubscription
{
? "numberOfRows" : 20,
? "instrument" : "STK",
? "locationCode" : "STK.US.MAJOR",
? "scanCode" : "MOST_ACTIVE_AVG_USD"
}


On Tue, Jun 13, 2023 at 01:51 PM, <unclekensson@...> wrote:
I did, but it behaves the same way during RTH as well.


 

I couldn't get the java client working (which is my problem, obviously), but I did manage to get a python client using ibsync up and running.

As far as I can see, it behaves in exactly the same way:

* it's definitely connected, other queries go through fine;
* the request is definitely reaching IB, because if I send a scan code like "NONSENSE", it returns an error; cancelling the scanner also works;
* no scan data is returned for a correct request

My question is really, how do I even go about trouble-shooting this? As you say, ´³¨¹°ù²µ±ð²Ô, it's a pretty simple scanner and (if I've read your message correctly) there's nothing wrong with the message reaching IB -- which fits with it having worked for a while last week.

Has anyone come across situations where a request is apparently mothballed rather than processed? Could there be some sort of problem with the account that causes a silent fail rather than an error? What would you try?


 

Along your questions, I'd make sure that TWS/IBGW does indeed receive the requests and check what, if anything, is returned. So enable API logging in TWS/IBGW, run your program, decrypt the the API log in TWS/IBGW and check what the request looks like from the TWS/IBGW side.

The log entry for a successful request/response looks like this:

15:15:16:088 <- 22-10000001-20-STK-STK.US.MAJOR-MOST_ACTIVE_AVG_USD--------------0------

15:15:16:568 -> --..20-3-10000001-20-0-756733-SPY-STK--0--SMART-USD-SPY-SPY-SPY----- ... truncated ...

Assuming you see the incoming request but no response, I'd look at the TWS/IBGW log. It is verbose, cryptic, and complex, but you might see an internal error message in case you are triggering some kind of issue in TWS/IBGW. In any case, this would probably be a case for a trouble ticket with IBKR.

In case there is some kind of response, you'd obviously need to check in your own program. One area to check is error reporting. You seem to be getting the "regular" error callbacks, but EWrapper actually has three different versions of the error() callback method.

´³¨¹°ù²µ±ð²Ô


On Wed, Jun 14, 2023 at 08:43 AM, <unclekensson@...> wrote:
I couldn't get the java client working (which is my problem, obviously), but I did manage to get a python client using ibsync up and running.

As far as I can see, it behaves in exactly the same way:

* it's definitely connected, other queries go through fine;
* the request is definitely reaching IB, because if I send a scan code like "NONSENSE", it returns an error; cancelling the scanner also works;
* no scan data is returned for a correct request

My question is really, how do I even go about trouble-shooting this? As you say, ´³¨¹°ù²µ±ð²Ô, it's a pretty simple scanner and (if I've read your message correctly) there's nothing wrong with the message reaching IB -- which fits with it having worked for a while last week.

Has anyone come across situations where a request is apparently mothballed rather than processed? Could there be some sort of problem with the account that causes a silent fail rather than an error? What would you try?


 

Thanks, ´³¨¹°ù²µ±ð²Ô.

The API and gateway logs don't show any data or errors (although we had some gateway logs from the day it worked). We're raising a ticket with IBKR.

My best hypothesis at the moment is that we might have hit a limit on scanners even though the original ones were cancelled and the clients killed[^0] -- does that chime with anyone else's experience/expectations? If so, is there an easy fix?

[^0]: While I often felt like doing this in my freelancing days, I should stress that no humans were harmed in the production of this bug.