msayem1 / trade-manager

Automatically exported from code.google.com/p/trade-manager
0 stars 0 forks source link

Multi account error #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. log in to tws live by pressing live button to connect.
2.
3.

What is the expected output? What do you see instead? I expexted to open 
cleanly and display account data. I get error 321 error validating request -zb 
invalid account code U...,U...

What version of the product are you using? On what operating system?
2.8 win7 

Please provide any additional information below. I have two accounts an IRA and 
a cash account. 

Original issue reported on code.google.com by erudite...@yahoo.com on 25 Nov 2012 at 2:12

GoogleCodeExporter commented 9 years ago
Ok I think this has something to do with managed accounts i.e. you have 
multiple of them when you log into TWS. I only have one account a cash/margin 
account see issue 7 same thing. So what I have done is re uploaded build 2.8 
and added some logging in the return of the request for managedAccounts() as I 
would like to see if this is even fired by TWS API when reqManagedAccts() is 
called. 

So please download 2.8 again and change the config.properties logging from 
ERROR to INFO. Then please send me the log via email

Thanks
Simon

# Log Values are TRACE, DEBUG, INFO, WARN, ERROR
# Use TRACE to see Hibernate SQL
log4j.rootCategory=INFO, CONSOLE, FILE

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%r [%t] %p %c %x - %m%n
log4j.appender.CONSOLE.Threshold=ERROR change to INFO

log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.FILE.File=trade.log
log4j.appender.FILE.DatePattern='.'yyyy-MM-dd
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%p] 
%c:%L - %m%n
log4j.appender.FILE.Threshold=ERROR change to INFO

Original comment by simon.allen on 25 Nov 2012 at 4:21

GoogleCodeExporter commented 9 years ago
Added parse logic to reqManagedAccounts() call. The csv string returned will be 
parsed and accounts setup as appropriate. The first account in the string is 
considered the master and will be set to the default account.

Original comment by simon.allen on 26 Nov 2012 at 4:13