IBc.GetPositionList() returns empty string for offsetting positions

This is just a heads-up to anyone using IBController 1.3.8 with FA accounts.

If one subaccount is long 100 shares of a stock, and another subaccount is short 100 shares of the same, IBc.GetPositionList() will return a blank string, and the IBc GUI will show no open positions, even though you have two of them.

This is something to consider when using FA accounts and IBController.

As precisely written in the docs:

You need to change your "info" account to query individual positions on subaccounts:

SetInfoAccount( string Account )
(new in 1.3.5)

This function changes the account which is displayed in the "account information" window and "portfolio" tabs.
It does NOT change account used for orders.

Separation of order and viewing accounts allows directing orders to any account withing changing any views, i.e. you can monitor/view "All" account - that displays cumulative information for all F&F/FA accounts or any other account while placing orders for other accounts.
By default viewing information is the "ALL" account and in most cases there is no need to change it as it receives updates from all sub-accounts.

Note that IB uses "A" subscript to designate "All" account that is aggregate of all subaccounts. So if your FA account has a number of F1234, you need to add "A" suffix to it to get aggregate data:

ibc.SetInfoAccount("F1234A");

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.