Groups and Profiles
Introduction
Financial Advisors are able to manage their allocation groups from the TWS API.
Request FA Groups and Profiles
EClient.requestFA(faDataType)
Requests the FA configuration as set in TWS for the given FA Data Type.
The configuration to retrieve. See FA Data Types table below.
Python
Java
C++
C#
VB.NET
requestFA FA Data Types
Receive FA Groups and Profiles
EWrapper.receiveFA(faDataType, faXmlData)
Receives the Financial Advisor’s configuration available in the TWS.
The faDataType value specified in the requestFA call.
The xml-formatted configuration.
Python
Java
C++
C#
VB.NET
Replace FA Allocations
EClient.replaceFA(reqId, faDataType, xml)
Replaces the FA configuration for the given FA Group or Profile.
To confirm that FA changes were saved, wait for the EWrapper.replaceFAEnd callback which provides the corresponding reqId. After saving, it is advised to verify the new FA setup via EClient.requestFA. If called before changes are fully saved, you may receive an error such as error 10230.
Request identifier used to track data.
The configuration structure to change. Set to 1 (Groups). Passing other values may trigger error 585.
XML configuration for the allocation group. See the Allocation Method XML Format section below for details.
Python
Java
C++
C#
VB.NET
replaceFA FA Data Types
EWrapper.replaceFAEnd
EWrapper.replaceFAEnd(reqId, text)
Marks the end of the replaceFA reception.
Request identifier used to track data.
The message text.
Python
Java
C++
C#
VB.NET
Allocation Methods and Groups
A number of methods for account allocations are available with Financial Advisor and IBroker account structures to specify how trades should be distributed across multiple accounts.
Allocation Groups can be created or modified in the Trader Workstation directly as described in TWS: Allocations and Transfers.
Alternatively, allocation groups can be created or modified through the EClient.replaceFA method in the API.
Interactive Brokers supports two forms of allocation methods: allocation methods with calculations completed by Interactive Brokers, and a set of allocation methods calculated by the user and then specified.
IB-computed allocation methods
- Available Equity
- Equal Quantity
- Net Liquidation Value
User-specified allocation methods (formerly known as Allocation Profiles)
- Cash Quantity
- Percentages
- Ratios
- Shares
Allocation methods for financial advisor allocation groups are defined using an XML format. The examples below show how each supported allocation method is structured.
Available Equity
Requires you to specify an order size. This method distributes shares based on the amount of available equity in each account. The system calculates ratios based on the Available Equity in each account and allocates shares based on these ratios.
Example: You transmit an order for 700 shares of stock XYZ. The account group includes three accounts, A, B and C with available equity in the amounts of $25,000, $50,000 and $100,000 respectively. The system calculates a ratio of 1:2:4 and allocates 100 shares to Client A, 200 shares to Client B, and 400 shares to Client C.
Monetary Amount
The Monetary Amount method calculates the number of units to be allocated based on the monetary value assigned to each account.
Equal Quantity
Requires you to specify an order size. This method distributes shares equally between all accounts in the group.
Example: You transmit an order for 400 shares of stock ABC. If your Account Group includes four accounts, each account receives 100 shares. If your Account Group includes six accounts, each account receives 66 shares, and then 1 share is allocated to each account until all are distributed.
Net Liquidation Value
Requires you to specify an order size. This method distributes shares based on the net liquidation value of each account. The system calculates ratios based on the Net Liquidation value in each account and allocates shares based on these ratios.
Example: You transmit an order for 700 shares of stock XYZ. The account group includes three accounts, A, B and C with Net Liquidation values of $25,000, $50,000 and $100,000 respectively. The system calculates a ratio of 1:2:4 and allocates 100 shares to Client A, 200 shares to Client B, and 400 shares to Client C.
Percentages
This method will split the total number of shares in the order between listed accounts based on the percentages you indicate.
Example: Assume an order for 300 shares of stock ABC is transmitted. Account A is set to have 60.0 percentage while Account B is set to have 40.0 percentage. Account A should receive 180 shares and Account B should receive 120 shares.
Note: Do not specify an order size. Since the quantity is calculated by the system, the order size is displayed in the Quantity field after the order is acknowledged. This method increases or decreases an already existing position. Positive percents will increase a position, negative percents will decrease a position. For example, to fully close out a position, specify a percentage of -100.
Ratios
This method calculates the allocation of shares based on the ratios you enter.
Example: Assume an order for 300 shares of stock ABC is transmitted. A ratio of 1.0 and 2.0 is set to Account A and Account B. Account A should receive 100 shares and Account B should receive 200 shares.
Contracts or Shares
This method allocates the absolute number of shares you enter to each account listed. If you use this method, the order size is calculated by adding together the number of shares allocated to each account in the profile.
Example: Assume an order for 300 shares of stock ABC is transmitted. Account A is set to receive 100.0 shares while Account B is set to receive 200.0 shares. Account A should receive 100 shares and Account B should receive 200 shares.

