开云体育

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

Clicking an override button


 

Hi all,

I have recently begun getting messages that a security is under
surveillance.
The exact entry in my program's log is below.
2025-03-24 06:59:15,321 ib_async.wrapper ERROR Error 201, reqId 7: Order
rejected - reason:Security is under Surveillance Measure - The scrip PE is
greater than 50 for the previous 4 trailing quarters.<br><br><br>Would you
like to continue?.

How do I click yes programmatically?
Pranav


 

Hi all,

I am answering my own question. I suspect I need to specify order conditions
and allow the advancedErrorOverride flag.

How do I do this?
Pranav

-----Original Message-----
From: Pranav Lal <pranav@...>
Sent: Monday, March 24, 2025 1:36 PM
To: '[email protected]' <[email protected]>
Subject: Clicking an override button

Hi all,

I have recently begun getting messages that a security is under
surveillance.
The exact entry in my program's log is below.
2025-03-24 06:59:15,321 ib_async.wrapper ERROR Error 201, reqId 7: Order
rejected - reason:Security is under Surveillance Measure - The scrip PE is
greater than 50 for the previous 4 trailing quarters.<br><br><br>Would you
like to continue?.

How do I click yes programmatically?
Pranav


 

Hi all,


Problem solved. I had to use a key value pair when specifying the string in
the advancedErrorOverride property.
advancedErrorOverride="8229,SURVEILLANCE"

I initially thought that ib_async did not support this property which is why
I switched to the tws API.
Pranav


 

开云体育

Where did you get this information? Is there any documentation for this?

From time to time my orders are canceled, this might help?





---- On Thu, 27 Mar 2025 17:41:35 +0100 Pranav Lal<pranav@...> wrote ----

Hi all,


Problem solved. I had to use a key value pair when specifying the string in
the advancedErrorOverride property.
advancedErrorOverride="8229,SURVEILLANCE"

I initially thought that ib_async did not support this property which is why
I switched to the tws API.
Pranav








 

开云体育

Hi Gonzalo,

?

Documentation is sketchy to say the least. See the below link.

?

The rest of it was trial and error.

?

Pranav


 

开云体育

Thanks for your reply

So if I follow you correctly,?

  • you submit an order,?
  • it fails,?
  • you check your Trade.log for the error message,?
  • and in a future order, you set Order.advancedErrorOverride based on the error message on previous point





On 28 Mar 2025, at 00:53, Pranav Lal <pranav@...> wrote:

Hi?Gonzalo,
?
Documentation is sketchy to say the least. See the below link.?
?
The rest of it was trial and error.?
?
Pranav


 

开云体育

Hi,

?

I do not use as sophisticated an approach. I have just set the property for all orders. There is no harm in setting it that I have seen.

?

Pranav

?

From: [email protected] <[email protected]> On Behalf Of Gonzalo Saenz via groups.io
Sent: Saturday, March 29, 2025 8:24 PM
To: [email protected]
Subject: Re: [ib-async] Clicking an override button

?

Thanks for your reply

?

So if I follow you correctly,?

?

  • you submit an order,?
  • it fails,?
  • you check your Trade.log for the error message,?
  • and in a future order, you set Order.advancedErrorOverride based on the error message on previous point

?

?

?

?



On 28 Mar 2025, at 00:53, Pranav Lal <pranav@...> wrote:

?

Hi?Gonzalo,

?

Documentation is sketchy to say the least. See the below link.?

?

The rest of it was trial and error.?

?

Pranav

?