gofinance / ib

Pure Go interface to Interactive Brokers IB API
386 stars 120 forks source link

Avoid the account code is required for this operation for FA accounts. #20

Closed haohui closed 8 years ago

haohui commented 8 years ago

When using a FA account, the current master consistently fails to login, reporting

Error validating request:-'dd' : cause - The account code is required for this operation.

Looking at the latest client implementation from IB, it looks like the server now requires the account code for the RequestAccountUpdates request.

This PR removes the first RequestAccountUpdates request and folds the workflow into the RequestManagedAccounts request. That way the event loop automatically sends the RequestAccountUpdates requests for all accounts.