No answer after a Login message

Created at 04 Feb 2022, 20:08
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!
SI

sim.bianc.gns

Joined 14.01.2022

No answer after a Login message
04 Feb 2022, 20:08


Hello, I've some issues in testing the FIX API. I send the Login messages to both sockets in plain text, however no answer has arrived. The socket should be connected correctly because no exceptions are raised.

These are data of the FIX API:

Host name: h35.p.ctrader.com
Port: 5211 (SSL), 5201 (Plain text)
Password: ***** (a/c 12015715 password)
SenderCompID: demo.purpletrading.12015715
TargetCompID: cServer
SenderSubID: QUOTE

 

Host name: h35.p.ctrader.com
Port: 5212 (SSL), 5202 (Plain text)
Password: ***** (a/c 12015715 password)
SenderCompID: demo.purpletrading.12015715
TargetCompID: cServer
SenderSubID: TRADE

 

These are the Login messages sent to both sockets:

Trade

8=FIX.4.4|9=141|35=A|49=demo.purpletrading.12015715|56=cServer|57=TRADE|50=any_string|34=1|52=20220204-17:54:27|98=0|108=10|141=Y|553=12015715|554=**********|10=241|

Quote

8=FIX.4.4|9=136|35=A|49=demo.purpletrading.12015715|56=cServer|57=QUOTE|50=Quote|34=1|52=20220204-17:54:27|98=0|108=10|141=Y|553=12015715|554=**********|10=227|


@sim.bianc.gns
Replies

amusleh
07 Feb 2022, 09:33

Hi,

Did you tried on our FIX samples? and you can't have two FIX session at the same time, you can only have one active connected FIX session.


@amusleh

sim.bianc.gns
07 Feb 2022, 11:00

RE:

amusleh said:

Hi,

Did you tried on our FIX samples? and you can't have two FIX session at the same time, you can only have one active connected FIX session.

I didn't try it because I'm using python. I don't have any FIX session because I've never received any answer from the server (even in my personal area they are not registered).

The flow is that I connect through the module socket to the host name and port reported in the first message and then I send the Logon message in both socket. Is there anything else that I must do first?
 


@sim.bianc.gns

amusleh
08 Feb 2022, 09:58

RE: RE:

sim.bianc.gns said:

amusleh said:

Hi,

Did you tried on our FIX samples? and you can't have two FIX session at the same time, you can only have one active connected FIX session.

I didn't try it because I'm using python. I don't have any FIX session because I've never received any answer from the server (even in my personal area they are not registered).

The flow is that I connect through the module socket to the host name and port reported in the first message and then I send the Logon message in both socket. Is there anything else that I must do first?
 

Hi,

If you are using plain text host/port you can start sending messages after connection, only for SSL you need an extra authentication step before you start to send any message.

Most probably your message is not formatted correctly, that's why server is not returning any message back.


@amusleh

sim.bianc.gns
08 Feb 2022, 11:52

RE: RE: RE:

amusleh said:

sim.bianc.gns said:

amusleh said:

Hi,

Did you tried on our FIX samples? and you can't have two FIX session at the same time, you can only have one active connected FIX session.

I didn't try it because I'm using python. I don't have any FIX session because I've never received any answer from the server (even in my personal area they are not registered).

The flow is that I connect through the module socket to the host name and port reported in the first message and then I send the Logon message in both socket. Is there anything else that I must do first?
 

Hi,

If you are using plain text host/port you can start sending messages after connection, only for SSL you need an extra authentication step before you start to send any message.

Most probably your message is not formatted correctly, that's why server is not returning any message back.

Do I have to send the Logon message in anycase in both sockets, right? Shouldn't I receive an answer if the login is done correctly? 

The fields are the same reported in the documentation, maybe in different position in respect to the example provided. Does it matter?
In addition, in the documentation the bodylenght is always 5 less than the correct value. Is there any other field which isn't included in the count? (Except for beginString, bodyLenght and checksum)


@sim.bianc.gns

amusleh
09 Feb 2022, 08:51 ( Updated at: 09 Feb 2022, 08:52 )

RE: RE: RE: RE:

sim.bianc.gns said:

Do I have to send the Logon message in anycase in both sockets, right? Shouldn't I receive an answer if the login is done correctly? 

The fields are the same reported in the documentation, maybe in different position in respect to the example provided. Does it matter?
In addition, in the documentation the bodylenght is always 5 less than the correct value. Is there any other field which isn't included in the count? (Except for beginString, bodyLenght and checksum)

Hi,

You will receive a response back from server if your logon request was successful.

I haven't tested FIX on Python but I tested our .NET samples and everything works fine.

As I said on my previous post, most probably something is wrong with your code.

We will create a Python example for FIX API in near future and then I will be able to help you.


@amusleh