Replace FA Allocations

View as MarkdownOpen in Claude

EClient.replaceFA (

reqId: int. Request identifier used to track data.

faDataType: int. The configuration structure to change. Set to 1 or 3 as defined above.

xml: String. XML configuration for allocation profiles or group. See [Allocation Method XML Format](/tws-api/doc/financial-advisors/allocation-method-xml-format/introduction) for more details.
)

1self.replaceFa(reqId, 1, xml)

replaceFA FA Data Types

replaceFA Type CodeType NameDescription
1Groupsoffer traders a way to create a group of accounts and apply a single allocation method to all accounts in the group.
2Account Aliaseslet you easily identify the accounts by meaningful names rather than account numbers.

Note:

In order to confirm that your FA changes were saved, you may wait for the EWrapper.replaceFAEnd callback, which provides the corresponding reqId. In addition, after saving changes, it is advised to verify the new FA setup via EClient.requestFA. If it is called before changes are fully saved, you may receive an error, such as error 10230. See Message Codes.

[EClient.replaceFA](/tws-api/doc/financial-advisors/replace-fa-allocations) only accepts faDataType 1 now. Otherwise, it may trigger [error 585](/tws-api/doc/error-handling/error-codes).

EWrapper.replaceFAEnd (

reqId: int. Request identifier used to track data.

text: String. the message text.

)

Marks the ending of the replaceFA reception.

1def replaceFAEnd(self, reqId: int, text: str):
2 super().replaceFAEnd(reqId, text)
3 print("ReplaceFAEnd.", "ReqId:", reqId, "Text:", text)