FIX Api answer is kind of random

Created at 20 Feb 2024, 08:57
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!
JA

jan.schmid

Joined 19.02.2024

FIX Api answer is kind of random
20 Feb 2024, 08:57


    Hello,

my goal is to ask for realtime prices, but in the moment i try to connect to the demo server and get an anwer.

 

So thats my Code and my logon_msg is 

    “8=FIX.4.4|9=126|35=A|34=1|49=demo.ctrader.4086408|57=QUOTE|50=any_string|52=20170117-08:03:04|56=cServer|98=0|108=30|141=Y|553=jan.schmid|554=*******|10=069”

    but the response i get is "§♥☺☻☻F" why is that or what is wrong in my code?

 

if __name__ == "__main__":

    

    client = FIXAPIClient(host="demo1.p.ctrader.com", 

                          port=5011, 

                          username="jan.schmid", 

                          password="*****", 

                          sender_comp_id="demo.ctrader.4086408", 

                          sender_sub_id="QUOTE", 

                          target_comp_id="cServer")

    print(client)

    logon_msg = client.logon_message("QUOTE")

    print(logon_msg)

    response = client.send_message(logon_msg)

    print(response)
    

@jan.schmid
Replies

ctid1980098
20 Feb 2024, 14:15

Hi

Shouldn't you be decoding your message received in python. Something like… 

print(response.decode('utf-8')) 


@ctid1980098

jan.schmid
01 Mar 2024, 09:33 ( Updated at: 01 Mar 2024, 11:58 )

Fixed it

The problem was that i used the password from the account and not the password from the actual trading account. Where you can change there


@jan.schmid