sFOX API
Sign InOpen Account
sFOX API
sFOX API
  • Introduction
    • Welcome
    • Getting Started
    • Systems & Operations
    • Rate Limits
  • REST API
    • REST Endpoints
    • Authentication
    • Rate Limits
    • Account Management
      • Get All Balances
      • Get All Currencies
      • Get All Currency Pairs
      • Get All Transactions
      • Get Fees
    • Orders
      • Order Types
      • Create Order
      • Cancel Order
      • Cancel Multiple Orders
      • Cancel All Orders
      • Amend Order
      • Get Single Order
      • Get All Open Orders
      • Get All Done Orders
      • Get All Trades
    • Request for Quote (RFQ)
    • Post-Trade Settlement (PTS)
      • Get Account Risk Metrics
      • Get All Positions
      • Get All Funding Transactions
      • Get All Funding Rates
      • Get All Risk Modes
      • Create Transfer
    • Shorting
      • Get Account Risk Metrics
      • Get All Positions
    • Transfers
      • Get All Deposit Addresses
      • Get Single Deposit Address
      • Create Deposit Address
      • Deposit From Bank Account
      • Withdraw From Account
      • Get Single Withdrawal Fee
      • Create Transfer
    • Custody (sFOX SAFE)
      • Get Whitelisted Addresses
      • Add Whitelisted Address
      • Delete Whitelisted Address
      • Get Approval Rules
      • Create Approval Rule
      • Edit Approval Rule
      • Get Approval Requests
      • Respond to Approval Request
    • Staking
      • Get Staking Currencies
      • Get All Staking Transactions
      • Create Stake
      • Cancel Stake
      • Unstake
    • Market Data
      • Get Candlesticks
      • Get Volume Analytics
      • Get Order Estimate
      • Get Order Book
    • Reporting
      • Get Orders Report
      • Get Monthly Summary
      • Get Portfolio Valuation
      • Get All Transactions
  • WebSocket API
    • Introduction
    • Connecting
    • Rate Limits
    • Authentication
    • Subscribing & Unsubscribing
    • Message Format
    • Market Data
      • Order Book
      • Trades
      • Ticker
    • Orders & Account Data
      • Orders
      • Trades
      • Balances
      • Post-Trade Settlement
  • FIX API
    • FIX Order Entry
    • FIX Market Data
    • QuickFIX Guide
  • Errors
    • Error Codes
Powered by GitBook
On this page
  • About QuickFIX
  • QuickFIX/C++
  • QuickFIX/J (Java)
  • Quickfix/N (C#)
  1. FIX API

QuickFIX Guide

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

PreviousFIX Market DataNextError Codes

Last updated 2 years ago

About QuickFIX

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

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++:

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

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)

Update the SenderCompID to the name of your choice

[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)

LOGON responses will arrive after the heart beat interval, you will either need to set the heart beat interval low or set LogonTimeout > HeartBtInt

UseSNI: You must set UseSNI=Y, which is supported in >=2.3.0

stunnel is required for Java versions before 1.17

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

Compile : cmake then make in the root directory

Use the below with stunnel tunnel.conf

Run the ./bin/tradeclient <file_name>.cfg

QuickFIX/C++
stunnel Configuration
Test Client
HomeQuick Fix Engine