There is no response from SERVER

Created at 12 Aug 2020, 13:50
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!
LU

lukasz.manterys

Joined 12.08.2020

There is no response from SERVER
12 Aug 2020, 13:50


Hello,

 

I am working on my own application to trade, but i have problems with connection to the server via FIX API.

I use Qt and C++ languages.

Generally, if I sent the following Logon message (I am displaying it before sending), and there is no, response from cTrader server. Nothing. 

8=FIX.4.4|9=126|35=A|49=theBroker.12345|56=CSERVER|34=1|52=20170117- 08:03:04|57=TRADE|50=any_string|98=0|108=30|141=Y|553=12345|554=passw0rd!|10=131|

In C# sample code, I saw, there is replacing "|" for "\u0001" char before sending. I did the similar thing in my code, but, I got the following message format before sending...

8=FIX.4.49=12635=A49=theBroker.1234556=CSERVER34=152=20170117- 08:03:0457=TRADE50=any_string98=0108=30141=Y553=12345554=passw0rd!10=131

Of course, there is no response from the server too. 

What is important, the SSL connection is established before sending Logon message.

 

Do you have any idea what is wrong? What should I change?

Thanks in advance!


@lukasz.manterys
Replies

PanagiotisCharalampous
12 Aug 2020, 14:15

Hi Lukasz,

Did you exclude the possibility that there is a problem with the message e.g. wrong credentials? Did you get a response for the exact same message using the C# application?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

lukasz.manterys
12 Aug 2020, 14:35

RE:

PanagiotisCharalampous said:

Hi Lukasz,

Did you exclude the possibility that there is a problem with the message e.g. wrong credentials? Did you get a response for the exact same message using the C# application?

Best Regards,

Panagiotis 

Join us on Telegram

 

Yes, sure. 

In C# sample I modified Logon message with my personal data and it worked - login process was successful. 

..but in my case I don't get any response from the server. Even passing wrong data, there should be a response with some error code, for example, invalid data..


@lukasz.manterys

lukasz.manterys
15 Aug 2020, 21:39

RE:

Panagiotis, one more question:
In what cases server could not respond at all?

I am asking, because I noticed strange thing:
I am sending such sample msg through C++/Qt and it works (i am able to receive a response):
Sending msg:
 

QString msg1 =     "8=FIX.4.49=11635=A49=sales.300615656=CSERVER57=QUOTE50=300615634=152=20200810-13:22:0698=0108=30553=3006156554=sp0tw@re10=145";

..and I got the response:

"8=FIX.4.4\x01""9=104\x01""35=5\x01""34=1\x01""49=CSERVER\x01""50=QUOTE\x01""52=20200815-18:29:51.023\x01""56=sales.3006156\x01""57=3006156\x01""58=RET_NO_SUCH_LOGIN\x01""10=008\x01"

There is a response msg - It is good :)

 

Now, as I said before, I logged in via C# sample successfully (with my cTrader data). Next, I copied sent Logon msg (via C# sample) to my C++ implementation (without any changes) and.. there is the same root issue - THERE IS NO RESPONSE. My C++ client waits for the response, but there is no any...

Logon msg that was good in C# sample:

QString successMsg = "8=FIX.4.49=12435=A49=icmarkets.101898656=CSERVER57=QUOTE50=101898634=152=20200815-15:29:4098=0108=30553=1018986554=myPassword10=137";

 

Do you have any idea why? 

In what cases the server does not respond? Maybe it could be some guide for me...

 

Best Regards,

Lucas


@lukasz.manterys

PanagiotisCharalampous
17 Aug 2020, 08:41

Hi Lukasz,

The server will not respond if it cannot parse the message. If you are sending the exact same message to the exact same proxy and port, you should receive the same response. If it works with C#, it seems there is no issue with the message or the server. It could be something with the programming language. Unfortunately I cannot help you much with C++ as I do not have much experience with it.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous