How to connect Strategy Server to Ember
This article describes how to connect Deltix Strategy Server (part of QuantOffice product) to Ember.
Overview
Strategy Server connect to Ember using FIX Protocol. Ember FIX 4.4 Protocol described here is used for this integration.
General idea - in order to enable this connection you need to configure both sides of FIX session - on STS side and on Ember FIX gateway side.
Order Source (STS)
Strategy Server configuration mainly focuses in parameters of the FIX session.
The following settings in 'admin.properties' in you Strategy Server configuration home directory:
StrategyServer.EmberFixConnector.SocketConnectHost=localhost
StrategyServer.EmberFixConnector.SocketConnectPort=9001
StrategyServer.EmberFixConnector.ReceiveBufferSize=-1
StrategyServer.EmberFixConnector.SendBufferSize=-1
StrategyServer.EmberFixConnector.SenderCompID=TCLIENT1
StrategyServer.EmberFixConnector.TargetCompID=DELTIX
StrategyServer.EmberFixConnector.Password=epam # TODO: Must be encoded/hashed
# TODO: Not needed for non-stop sessions
#StrategyServer.EmberFixConnector.StartDay=Monday
#StrategyServer.EmberFixConnector.StartTime=00\:00\:30
#StrategyServer.EmberFixConnector.EndDay=Saturday
#StrategyServer.EmberFixConnector.EndTime=00\:00\:00
StrategyServer.EmberFixConnector.NonStopSession=true
StrategyServer.EmberFixConnector.FileLogPath=./logs/fixLogs
StrategyServer.EmberFixConnector.FileStorePath=./trader/store
StrategyServer.EmberFixConnector.SocketNoDelay=true
StrategyServer.EmberFixConnector.ReadThreadPriority=Highest
| Parameter | Default Value | Description |
|---|---|---|
SocketConnectHost | localhost | (A) Ember FIX Session host |
SocketConnectPort | 9001 | (B) Ember FIX Session port |
SenderCompID | (C) SenderCompId(49) parameter of the FIX Session, from STS point of view | |
TargetCompID | (D) TargetCompID(56) parameter of the FIX Session, from STS point of view | |
password | (E) FIX session password. (Read up on using Secret storage or Password Hashing) |
Order Destination (Ember)
Set up Ember FIX Order Entry gateway on the order destination side. Here is a config example:
First, set up the list of supported FIX client sessions:
gateways {
clientdb {
factory = "deltix.ember.service.gateway.clientdb.simple.SimpleGatewayClientDatabaseFactory" # for client database defined in this config file
settings {
ORD_ENTRY: [ # identifies gateway
{
senderCompId: STS # (C) FIX Tag TargetCompId(49) from "Ember" side
port: 9001 # (B) port number for this FIX session
gatewayName: ORD_ENTRY
gatewayType: FIX_ORDER_ENTRY
password: EV8aa147993e8c9c4424b696c698415dcf # (E) FIX LOGON(A) password (hash or reference to secret)
}
]
}
}
TRADE {
ORD_ENTRY {
settings {
host: "localhost" # (A) server socket bind address (this is how host (C) is visible locally)
senderCompId: EMBER # (D) FIX Tag SenderCompId(49) from "Ember" side
}
}
}
}
More information on FIX Gateway configuration can be found in Configuration Reference Guide here. Also, make sure to read up this section on how to maintain configuration secrets like FIX session password.
Security
- The STS-Ember connection described above assumes the communication channel is secure. This is especially important when STS and Ember are running on different servers or even in different networks. In such cases we assume that the FIX connection goes over a secure VPN cross-connect or relies on TLS termination (e.g. STUNNEL or HAPROXY on FIX client side and NLB with TLS on server side).
- In addition, we recommend whitelisting the source IP of the FIX client as the only source that can connect to FIX server port (10001) in our example.
FIX Session schedule
In this example we did not define a FIX session schedule. We will rely on the Ember FIX gateway's ability to perform an in-session sequence in/out number reset once it reaches 100000000 (configurable).
Order Routing
Order requests that reach the FIX gateway (Chicago site in our example) are routed to the destination specified by FIX tag ExecBroker(76). In our configuration example, we set up the trade connector in New York to send all orders to the "TWAP" destination in Chicago.
Alternatively, if you need more flexibility you can define order request router or request transformer to customize order request routing.