Tuesday, 3 August 2010

Archiving Interactive Brokers Audit Trails

An irritant of the interactive brokers single account is that the audit trail can only be viewed for the past week. I did however search through the TWS file system and found a series of folders named with a seemingly random series of letters. Within these are archived xml format audit trails which could be parsed and their data put into some form of database.


There is a problem though, the tags of each of the values are given as integers and not to their corresponding description. I contacted IB regarding whether it's possible to get a list of the tag number/description matching pairs, but was informed that this information is not given out to clients. A pain in my opinion, but there's not much I can do.


However, I have written an html scraper of the condensed form of the audit trail which can be viewed from the TWS by the toolbar: View -> Audit Trail which converts the information to csv and excel formats. This works fine, however it's defeats the object of keeping an automated trading system if I have to manually save the html audit trail at the end of every day (or all 7 at the end of a week). Also given that some of IB's clients manage multiple accounts, the simple 5 minute act of saving an audit trail and parsing it each day becomes a much larger and costly task.


If I ever get the incentive, it would be possible to write a matching algorithm from these to find the corresponding description for each matching tag. For now though, I'm content with the 5 minutes each day on the single account.

No comments:

Post a Comment