[Music]
okay welcome back to this tutorial
series on fix API for algorithmic
trading in the last video we talked
about fixed pricing connections we went
through messaging sequences how to
establish log on messaging sequences and
essentially authenticate with a fix
server we focused on pricing connections
therein today however will focus on
trading connections and describe the key
differences between pricing and trading
connections as well as any additional
requirements that go into establishing a
trading connection in terms of agenda
we'll go through a quick recap of the
typical fix authentication sequence
followed by discussing the differences
between fixed pricing and trading
connections these include an additional
requirement over and above what we
discussed in the previous tutorial those
requirements including the sender Kampai
the target comp ID username password
host and port in fixed trading
connections there is an additional
requirement for account ID that goes
into certain messaging types we'll
discuss that as well as sequence
persistence something that wasn't
required in fixed pricing connections
we'll continue from there on to SSL
connectivity as that is required for
establishing fix trading connections
we'll go through how to configure your
application to do so to connect via SSL
to the fixed server as well as tunneling
software in order to establish that
conduit to that tunnel literally between
your application and the fixed server
via SSL and finally we'll conclude with
the future tutorials what they'll
contain and how we're going to progress
from this tutorial onwards
so without further ado let's go through
our quick recap of what we covered in
the fix pricing as well as message
sequence tutorial that we did recently
and that essentially described what a
fix message is composed of it is a
sequence of tag value pairs as we talked
about then each pair being delimited by
an S key start of a header control
character tags used must not appear more
than once except in repeating groups
this is something we'll cover in future
tutorials as well we then went on to
look at some example logon sequences an
example logon 35 equals a message where
we basically put together what exactly
is required in terms of authentication
credentials such as sender grant PI T
target comp ID username and password we
described how to calculate the body
length and checksum we then basically
did a little overview of what a sequence
looks like a client sends a 35 equals a
message to the fixed server to initiate
a logon sequence if all the credentials
are correct and everything is valid as
regards the message that was sent to the
fixed server and the fixed server
responds with its own logon message
completing the transaction and
authenticating the user
so with that we've wrapped up our recap
and we can proceed to what we are
discussing today in terms of the
differences between pricing and trading
connections what's entailed any
additional parameters that are required
and will go into SSL connectivity and
how to achieve that between your fix
application and the fixed server
specifically for trading connections
so these differences essentially center
around SSL in pricing no SSL in pricing
connections no SSL is required and
pricing connections must reset sequence
number zone logon this is what we
discussed earlier in the previous
tutorial with the reset SEC num flag
that has to be set to Y in order for the
connection to be valid with trading
connections however SSL is required and
at the present time SSL version two and
three and TLS version 1 and 1.1 are
supported for these types of connections
in addition to the sender comp ID target
comp ID username password host and port
combination that we discussed as being
required to establish pricing
connections all of those things are
required for establishing a trading
connection and for the actual connection
the logon handshake nothing more is
required then the same parameters as for
pricing
however with trading connections the
objective being to transact in terms of
orders order execution requires one
additional parameter that is provided to
you when you create an account at Darwin
X an account ID and this account ID is
required for order execution
specifically for 35 equals d messages
for new order single messages trading
connections in addition to that must
persist sequence numbers on logon as
opposed to pricing where you can set the
reset signal flag to Y in the case of
trading connections you need to set the
reset SEC numb flag to N as message
persistence is mandatory for
establishing the connection moving on
from there to actually establishing the
SSL connectivity and what's required
let's discuss the steps you need to take
to configure your fix application in
order to do that firstly as we discussed
just now set tag 1 for 1 which is the
reset SEC numb flag to N as message
persistence is mandatory secondly now
these two parameters socket connect host
and socket connect port our specific
naming conventions to quick fix this
essentially is referring to the host
you're connecting to and the port so
these things may differ depending on the
engine you are using instead of
specifying the fix
servers host as you did with the pricing
connections as well as the fixer report
we will specify in our case for this
example the local host IP address which
is 127.0.0.1 and port 443 in this case
since we're establishing a connection to
the local ssl tunnel that i'll go to go
on to describe shortly what that is why
that's required and this configuration
is essentially something that will be
done by you in your ssl tunneling
software something we'll go and do
shortly what we're doing here is it
because our application cannot connect
to the fixed server via SSL on and so we
need a mechanism for establishing an ssl
connection in order for us to do that we
need some sort of tunneling software and
the most popular in that department is
the open source s tunnel software which
you can visit www.hsn.com text what
we're essentially doing is we have this
application that is sitting on a certain
port that it's configured to listen on
that in this example being port 443 you
can configure this de near the port of
your choice as we'll go on to describe
shortly and instead of our fixed
application connecting directly to the
fixed server we're going to have it
connect to this tunneling software on
the localhost that will then wrap the
connection via SSL to the fixed server
and be the middleman the bridge between
our application and the fixed server
this will then establish an SSL tunnel
between our fixed application and the
fixed server that requires SSL
connectivity as a mandatory requirement
for establishing a trading connection in
order for us to do so we need to make
these changes as we've discussed so far
if for instance you're using quick fix
then configuration files will require
these four parameters in particular to
be changed as we've discussed in this
tutorial
meaning reset on logon and reset SEC
numb flag being set to N and the socket
connect host and socket connect for
being set to 127.0.0.1 and 443
respectively through this example as
I'll show you shortly how you configure
your están configuration file will
determine these values so 443 and 127
are simply example IP address and port
configuration parameters that we've
chosen for this tutorial
once you've downloaded and installed s
tunnel launching the GUI will lead to a
screen such as the one on the top right
of this screen you'll see four tabs at
the top file configuration safe peer
certificate and help if you click on the
configuration menu and then click Edit
configuration this will launch your
default text editor in most windows
systems that is the default notepad and
once that's launched you need to add the
following lines to your s tunnel comm
file here again the naming conventions
are purely for the purposes of this
tutorial so when you see in the
configuration below fix underscore
localhost underscore to underscore
Dominic's server this is purely an
example you can have anything fix one
fix to whatever you'd like to call it
that's irrelevant the what's relevant
are the parameters below the first line
and the values you put in them because
it's these values that need to be
correctly specified and we need to be in
your fix application configuration in
order for the tunnel to be established
successfully the client equals yes as
your fixed application is the client
application connecting to the fixed
server except equals 127.0.0.1 : 443 in
this example here is where you can
change these parameters to suit whatever
configuration you'd like but for this
example and the default norm is to
choose 443 for SSL however if you have
any other reason for choosing a
different port configuration you can do
that over here connect equals server
hostname or IP : server port this is
where you specify the server the fixed
servers hostname or IP address followed
by the fixed service port for the
trading connection details of which
you'll have been provided by Darwin X
once you've logged in and created your
account and received your fixed
connector details now this information
is specific to the trading connection
remember that Center comp ID target comp
ID username password these four main
credentials that are common to both
pricing and trading connections have
different values for pricing connections
and trading connections so it's
important to make
that you've that you've copied over the
correct values from the configuration
that's provided to you by to our next
staff and finally your configuration
here is complete after specifying these
four lines the first line being a name
for the connection you'd like to
establish client equals yes except
equals host and port that you'd like
your application to connect to and
connect equals the fixed server's
hostname or IP address and its port and
that's it that's your s Talent
configuration complete for the purposes
of this fix application all you need to
then do is save the file close the file
and under the same configuration menu
hit reload configuration that should get
everything to load up correctly and you
will see those messages displayed in the
estimate log on the top right of the
screen as you can see on the top right
of this screen a few other notes to this
effect using s tunnel in client mode
does not require presenting a valid SSL
certificate for establishing a
connection to the fix trading server so
there is a default p.m. file that ships
with s tunnel you needn't worry about
that because presenting an SSL
certificate for the purposes of
connecting to the fix server is not
necessary secondly you'll need a valid
static IP address in order to establish
a fixed trading connection at the
present time dynamic IP addresses are
not permitted in order to establish a
fixed rated connection there are certain
operational configuration considerations
that go into play when deciding this and
therefore at the present time should you
wish to create FX trading connection to
adorn an ex-fix server you'll need a
static IP address that is required to
have been registered already with the
fixer prior to you initiating the
connection so if you have a dynamic IP
address that's prone to changing and the
static IP addresses was configured at
the fixed server your connection will be
tonight therefore it's important that
you have a valid static fixed IP address
in order to initiate the connection and
that's pretty much it that's your ssl
connectivity
those are your ssl connectivity
requirements for establishing a fixed
trading connection
and the key difference is as we've
discussed today being that a you need to
connect via SSL and B you need an
account ID if you're going to send any
order related instructions as always if
you enjoyed this presentation please do
consider sharing it with your social
networks colleagues co-workers and
friends and do subscribe to the Darwin X
YouTube channel so you remain up-to-date
with all future videos that will be
released in this series and other topics
discussed on Darwin X thank you very
much for your attention see you next
time