Unable to Connect Using FIX credentials provided by Sample App or by Broker details in Settings

Created at 31 Mar 2020, 08:42
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
CT

ctid1412177

Joined 02.03.2020

Unable to Connect Using FIX credentials provided by Sample App or by Broker details in Settings
31 Mar 2020, 08:42


Dear Team,
I have used your C# Sample FIX message App to debug my own attempts but the connection data contained in the app fails to send and receive logon messages.  PORTS are 5212 (TRADE) 5211(QUOTES)

Using the inputs provided in the sample app
SEND
8=FIX.4.4
9=116
35=A
49=sales.3006156
56=CSERVER
57=QUOTE
50=3006156
34=1
52=20200331-05:16:15
98=0
108=30
553=3006156
554=sp0tw@re
10=147

RECEIVE
8=FIX.4.4
9=104
35=5
34=1
49=CSERVER
50=QUOTE
52=20200331-05:16:14.316
56=sales.3006156
57=3006156
58=RET_NO_SUCH_LOGIN
10=253

Also. TargetCompID is camel notation on the GUI but in the C#code it is caps lock using CSERVER/cServer.  Furthermore, c# code expects numeric values for SenderSubID but according to the broker code, it is QUOTE OR TRADE.

 

If I use the same structure with my credentials

SEND
8=FIX.4.4
9=116
35=A
49=fxpig.xxxxxx
56=CSERVER
57=QUOTE
50=xxxxx
34=1
52=20200331-05:01:43
98=0
108=30
553=xxxxxxx
554=BCHB2020
10=073

RECEIVE

8=FIX.4.4
9=103
35=5
34=1
49=CSERVER
50=QUOTE
52=20200331-05:01:43.292
56=fxpig.xxxxxxx
57=xxxxxxx
58=RET_INVALID_DATA
10=116

Could you please advise why it cannot send and receive?
Thanks


@ctid1412177
Replies

PanagiotisCharalampous
31 Mar 2020, 09:06

Hi there,

RET_INVALID_DATA indicates a wrong password. Can you please check your password again?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

ctid1412177
31 Mar 2020, 10:45

Hi,
I tried your suggestion and changed the password  - it did not work, I then changed the ports from 5212/5211 to 5202/5201 (no SSL).  The sample FIX APi now connects.

Thanks


@ctid1412177

ctid1412177
31 Mar 2020, 11:49

RE:

PanagiotisCharalampous said:

Hi there,

RET_INVALID_DATA indicates a wrong password. Can you please check your password again?

Best Regards,

Panagiotis 

Join us on Telegram

 

I have tried to replicate the approach to a second account and I now have the error
TargetSubID is assigned with the unexpected value 'QUOTE', expected 'TRADE'

I have checked that the correct values are associated

The sample App now no longer runs, it now has a Syste.Net.SocketException - No Such Host is Known

System.Net.Sockets.SocketException
  HResult=0x80004005
  Message=No such host is known
  Source=System
  StackTrace:
   at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port)
   at FIX_API_Sample.frmFIXAPISample..ctor() in C:\Users\bedih\Source\Repos\FIX-API-Sample\FIX API Sample.cs:line 54
   at FIX_API_Sample.Program.Main() in C:\Users\bedih\Source\Repos\FIX-API-Sample\Program.cs:line 19

Where, _pricePort = "5211" and _host = " h47.p.ctrader.com"

or

Where, _pricePort = "5201" and _host = " h47.p.ctrader.com"


@ctid1412177

PanagiotisCharalampous
31 Mar 2020, 12:09

Hi there,

Can you post a screenshot of the relevant code part as below? As you can see I can login without any issues. I have changed nothing from the example application except the proxy and credentials.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

ctid1412177
31 Mar 2020, 15:39 ( Updated at: 21 Dec 2023, 09:21 )

RE:

PanagiotisCharalampous said:

Hi there,

Can you post a screenshot of the relevant code part as below? As you can see I can login without any issues. I have changed nothing from the example application except the proxy and credentials.

Best Regards,

Panagiotis 

Join us on Telegram

I note the difference in the _senderSubID in yours being "QUOTE" and in mine as "3266065", however, I am testing both streams and your own code sample follows a numeric code.  Also, I used the same approach with another account using FX PIG Broker and it worked.  So I am not sure why it does not here?

You can see using a FIX message system what I see
 

Local time UTC +3
Price channel:
2020.03.27 11:27:19.944 Recv         8=FIX.4.49=16235=534=149=cServer50=QUOTE52=20200327-08:27:22.57656=ctrader.326606557=Quote58=TargetSubID is assigned with the unexpected value 'QUOTE', expected 'TRADE'10=205


2020.03.27 11:27:19.764 Send         8=FIX.4.49=13335=A34=149=ctrader.326606556=cServer52=20200327-08:27:19.76450=Quote57=QUOTE98=0141=Y108=30553=3266065554=@PrVwML2KQz6$Wc10=143

Trade channel:
2020.03.27 11:27:20.095 Recv         8=FIX.4.49=16235=534=149=cServer50=TRADE52=20200327-08:27:22.76256=ctrader.326606557=Trade58=TargetSubID is assigned with the unexpected value 'TRADE', expected 'QUOTE'10=142


2020.03.27 11:27:20.018 Send         8=FIX.4.49=13335=A34=149=ctrader.326606556=cServer52=20200327-08:27:20.01850=Trade57=TRADE98=0141=Y108=30553=3266065554=@PrVwML2KQz6$Wc10=067

 

 

 


@ctid1412177

PanagiotisCharalampous
31 Mar 2020, 16:12 ( Updated at: 21 Dec 2023, 09:21 )

Hi,

If you change the _senderSubID to QUOTE, as expected in the Rules of Engagement, it should work fine. I will update the sample to reflect this.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous