AlgoTraderAlgoTrader Documentation

Chapter 8. Adapters

8.1. Fix Interface
8.2. Bloomberg
8.3. IB Native Interface
8.4. QuantHouse
8.5. Binance
8.6. Bitfinex
8.7. Bitflyer
8.8. BitMEX
8.9. Bitstamp
8.10. CoinAPI
8.11. Coinigy
8.12. CoinMarketCap

The Fix infrastructure consists of the following classes:

Table 8.1. Fix Infrastructure

Class / InterfaceDescription
SessionA Session represents a connection to a broker / exchange / market data provider
ApplicationFor each Session an Application object is created. It will forward incoming messages to the corresponding MessageHandlers
DefaultFixApplication
FixApplicationFactoryIs responsible for the creation of Applications
DefaultFixApplicationFactory
FixMultiApplicationSessionFactory

Creates a Session and Application using the specified FixApplicationFactory according to the following steps:

  • lookup the FixApplicationFactory by its name

  • create an Application

  • create a DefaultSessionFactory

  • create a Session

ExternalSessionStateHolder Represents the current state of a Session (i.e. DISCONNECTED, CONNECTED, LOGGED_ON and SUBSCRIBED)
DefaultFixSessionStateHolder
MarketDataFixSessionStateHolderA ExternalSessionStateHolder for market data sessions that will subscribe to securities as soon as the session is logged on.
FixOrderIdGeneratorGenerator for Fix Order Ids. The default implementation reads the last Order Ids from the Fix log on start-up.
DefaultFixOrderIdGenerator
FixAdapter Management Adapter for the Fix environment. Allows the creation of dynamic sessions, sending Messages and managing Order Ids.
DefaultFixAdapter
ManagedFixAdapterManageable implementation of a FixAdapter (based on JMX)
FixEventSchedulerQuickFix/J currently supports daily sessions (with a daily session 7 times a week) and weekly sessions (with one weekly session). However some brokers (e.g. JP Morgan) use daily sessions during workdays. To accomplish this scenario, AlgoTrader allows creation of a weekly logon/logoff event (e.g. Mo 08:00:00 and Fr 18:00:00) using Esper Statements
DefaultFixEventScheduler
EventPattern
FixSocketInitiatorFactoryBeanA Spring Factory Bean that creates the SocketInitiator necessary for all Fix Sessions.
Fix42MarketDataMessageHandlerMessage Handler for incoming Fix market data messages. These classes need to be sub classed by the corresponding market data interface. Messages are propagated into the Esper Engine.
Fix44MarketDataMessageHandler
Fix42OrderMessageHandlerMessage Handler for incoming Fix Execution Reports. These classes need to be sub classed by the corresponding order interface. Messages are propagated into the Esper Engine.
Fix44OrderMessageHandler

The Bloomberg infrastructure consists of the following classes:


The IB infrastructure consists of the following classes:


The QuantHouse infrastructure consists of the following classes: