Configure quickfix\n and stunnel to connect to currenex

I have use quickfix 4.4 and sTunnel for below example to connect to a Currenex demo account. Download the UIDemo project from github. I’m using quickfix\n for c#.

About FIX

FIX is an electronic messaging protocol for financial transactions. The Financial Information eXchange (FIX) is an open, widely used industry standard. More information is available on the FIX protocol website. Quick fix is an open source application that provide such service as above. So below is my config file setting.


1. In quickfix.cfg [DEFAULT] ConnectionType=initiator ReconnectInterval=2 FileStorePath=store FileLogPath=c:\fixlog StartTime=00:00:00 EndTime=23:00:00 UseDataDictionary=Y DataDictionary=FIX44.xml SocketConnectHost= my external ip address SocketConnectPort= port to connect to sTunnel in your local pc ResetOnLogon=Y ResetOnLogout=Y ResetOnDisconnect=Y CheckLatency=N # standard config elements [SESSION] BeginString=FIX.4.4 SenderCompID= Hub FIX Taker ID Username= Hub FIX Taker ID Password= Hub FIX Taker Password TargetCompID=CNX (Name I define in sTunnel config file) HeartBtInt=20 SocketConnectPort=444 SocketConnectHost= my external ip address DataDictionary=FIX44.xml

2. In stunnel.conf [CNX] client = yes accept = your local pc external ip : port   eg.( connect = Currenex server ip address  eg.(

3. Build a self-signed pem cert in sTunnel. createcert1createcert2Click ‘enter’ and your cert is done!!

4. Add 2 lines of code in QFApp.cs as below, which is your hub username and password.


5. Start your sTunnel service.

6. Run the UIDemo application. And it works!! fix



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.