开云体育

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

Re: How to programatically approve a transaction: Security is under Surveillance


 

Glad that worked, Pranav, and thank you for sharing the solution.

You asked about files where you can read TWS/IBGW settings from. Each account folder under the TWS/IBGW installation folder (the random looking folder names with 40 lower case characters) contains a file called tws.xml (for TWS), ibg.xml (for IB Gateway), or both depending on what you used for login. Those files contain all configuration and layout information. There are also daily backup copies such as tws.Wed.xml.

Unfortunately, those files are encrypted and, in order to decrypt them, you'd have to log into TWS/IBGW:

  • In TWS you'd go to "File" -> "Layout Settings" -> "Save Decrypted Settings As". A window will pop up that warns about the fact that the file may contain personal information. The window asks whether you want to continue and has a Yes (left) and No (right) button. In case you select Yes, a file selector window opens where you can select the folder and file names for the decrypted information.
  • In IBGW you'd go to "File" -> "Gateway/Layout Settings" and a text window with the decrypted XML content comes up. The window has three buttons called (from left to right) "Copy to Clipboard"m "Export Settings", and "Close".

The XML documents are length and have sections for many different layout and operational settings. Among them sections for API "Settings", "Precautions", and "News Configuration".

I always wanted to make some tools to automate the monitoring and changing of TWS/IBGW configurations as well as TWS tabs so that I can guarantee consistency between multiple accounts. Reading and updating the XML files once decrypted is not that hard, but the decryption and recovery steps have to be done manually at this point (as far as i know).

闯ü谤驳别苍

?

?

?

On Thu, Mar 27, 2025 at 11:40 AM, Pranav Lal wrote:

Hi all,

?

Problem solved. I had to use a key value pair when specifying the string in the advancedErrorOverride property.

advancedErrorOverride="8229,SURVEILLANCE"

?

Pranav

Join [email protected] to automatically receive all group messages.