> For the complete documentation index, see [llms.txt](https://docs.sfox.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sfox.com/fix-api/quickfix-guide.md).

# QuickFIX Guide

How to start integrating sFOX's FIX API using the QuickFIX FIX Engine Library

## About QuickFIX

QuickFIX Engine is an open source implementation of the FIX Protocol. To learn more, visit:

{% embed url="<https://quickfixengine.org/>" %}

## QuickFIX/C++

QuickFIX/C++ is a FIX implementation for C++, Python, and Ruby. Follow these steps to start using sFOX's FIX API with QuickFIX/C++:

1. Compile [QuickFIX/C++](https://github.com/quickfix/quickfix/tree/master/examples/tradeclient): `cmake` then `make` in the root directory
2. Use the [`stunnel` Configuration](#stunnel-configuration) below with `stunnel tunnel.conf`
3. Run the [Test Client](#undefined) `./bin/tradeclient <file_name>.cfg`

{% hint style="warning" %}
Make sure to add your API key to the application (recommended to so do in code). Following these steps without adding your API Key will result in failure to connect
{% endhint %}

#### stunnel Configuration

`tunnel.conf`

```
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1

sslVersionMin = TLSv1.2
sslVersionMax = TLSv1.3

debug = debug
client = yes
foreground = yes

[order]
accept = 5001
connect = fix.sfox.com:5001
sni = fix.sfox.com
```

#### Test Client

`<file_name>.cfg` (i.e. sfox.cfg)

{% hint style="warning" %}
Update the `SenderCompID` to the name of your choice
{% endhint %}

```ini
[DEFAULT]
ConnectionType=initiator
ReconnectInterval=60

[SESSION]
BeginString=FIX.4.4
SenderCompID=<your_sender_comp_id>
HeartBtInt=10
TargetCompID=SFOX
UseDataDictionary=N
SocketConnectPort=5001
SocketConnectHost=127.0.0.1
StartTime=00:00:00
EndTime=00:00:00
ResetOnLogon=Y
LogonTimeout=60
FileStorePath=./stores
```

## QuickFIX/J (Java)

{% hint style="warning" %}
LOGON responses will arrive after the heart beat interval, you will either need to set the heart beat interval low or set *LogonTimeout > HeartBtInt*&#x20;
{% endhint %}

{% hint style="warning" %}
UseSNI: You must set UseSNI=Y, which is supported in >=2.3.0
{% endhint %}

{% hint style="info" %}
`stunnel` is required for Java versions before 1.17
{% endhint %}

## Quickfix/N (C#)

Example Config

```
[DEFAULT]
ConnectionType=initiator
ReconnectInterval=60

[SESSION]
BeginString=FIX.4.4
SenderCompID=STG-USER-MD-01 # your assigned sender comp id
HeartBtInt=10
TargetCompID=SFOX
UseDataDictionary=N
StartTime=00:00:05
EndTime=00:00:00
StartDay=Sunday
EndDay=Sunday
ResetOnLogon=Y
LogonTimeout=60
FileStorePath=./stores
SSLEnable=Y
SocketConnectPort=5001
SocketConnectHost=fix-md.staging.sfox.com # or fix.staging.sfox.com for OE sessions
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sfox.com/fix-api/quickfix-guide.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
