AlgoTraderAlgoTrader Documentation

Chapter 15. Reconciliation

15.1. Partner Systems
15.2. Email Handling
15.3. FTP Handling

Reconciliation is the automated process for comparing the status of the system with external partner systems (e.g. executed trades, current positions, cash transactions).

Reconciliation can for example be based on files received via email or retrieved via FTP. For every partner a sub class of ReconciliationService has to be created. This class has to contain at least the method reconcile() which receives the file being processed. Depending on the file format used by the partner different mechanisms for parsing the files are available:

The actual process of receiving files via email or FTP, storing them in a directory and passing them along to the ReconcilicationServices is typically implemented through Spring Integration.

The entire process is configured inside the file applicationContext-reconciliation.xml.

The MAIL section MAIL of applicationContext-reconciliation.xml consists of the following components:

Spring Integration supports plain FTP as well as SFTP (SSH File Transfer Protocol) and FTPS (FTP over SSL). FTP Reconciliation needs to be configured on a project specific basis inside applicationContext-env.xml. A typical configuration might look like this:

<bean id="sftpSessionFactory"

    <property name="host" value="${}"/>
    <property name="user" value="${sftp.user}"/>
    <property name="password" value="${sftp.password}"/>


<int:channel id="receiveChannel"/>


<int:channel id="processChannel"/>