FIX API – Immediate disconnection ("Connection reset by peer") with demo account

Created at 07 Apr 2025, 10:09
FU

fudheryk

Joined 07.04.2025

FIX API – Immediate disconnection ("Connection reset by peer") with demo account
07 Apr 2025, 10:09


Hello,

I'm currently trying to connect to your FIX demo environment using QuickFIX (C++ version) with the following account:

- Username / SenderCompID: demo.ctrader.5197077
- TargetCompID: cServer
- Host: demo-uk-eqx-01.p.c-trader.com
- Ports: 5211 (QUOTE), 5212 (TRADE)

Unfortunately, each time I send a Logon message, the server resets the connection immediately with: 

Socket Error: Connection reset by peer

I never receive any FIX Reject or Logout message.

To help diagnose the issue, here is the full configuration used in my `quickfix.cfg`:

[DEFAULT]
BeginString=FIX.4.4
SenderCompID=demo.ctrader.5197077
TargetCompID=cServer
HeartBtInt=30
ResetSeqNumFlag=Y
UseDataDictionary=Y
DataDictionary=spec/FIX44.xml
FileLogPath=logs/fix
FileStorePath=store/fix
UseSSL=Y
SSLCertificateVerify=Y
ReconnectInterval=60
Verbose=Y
LogHeartbeats=Y
ScreenLogShowIncoming=Y
ScreenLogShowOutgoing=Y
ScreenLogShowEvents=Y

[SESSION]
ConnectionType=initiator
SenderSubID=TRADE
SessionQualifier=TRADE
SocketConnectHost=demo-uk-eqx-01.p.c-trader.com
SocketConnectPort=5212
StartTime=00:00:00
EndTime=23:59:59

[SESSION]
ConnectionType=initiator
SenderSubID=QUOTE
SessionQualifier=QUOTE
SocketConnectHost=demo-uk-eqx-01.p.c-trader.com
SocketConnectPort=5211
StartTime=00:00:00
EndTime=23:59:59

From what I can see:

- The TLS handshake with your server works (confirmed via `openssl s_client`)
- The logon message contains the correct fields (`35=A`, `553`, `554`, `141=Y`)
- The password is alphanumeric-only for simplicity

**Can you please confirm:**
- Whether FIX access is enabled for this demo account?
- Whether the combination of SenderCompID, TargetCompID, and ports is valid?
- If any whitelisting is required on your side?

Thank you for your assistance, and please let me know if you need full FIX logs or a packet capture.

Kind regards,  
Frederic

 


@fudheryk