Topics
02 Oct 2016, 22:38
 4173
 8
07 May 2016, 01:23
 2562
 1
Replies

darhk
04 Oct 2016, 18:30

Hi Mindbreaker,

In your working logon code (post #17), were you able to get a logon message as a response after you send your logon message? I have similar code done in Python, but when I try to send my message, the FIX server disconnects me.

Thanks


@darhk

darhk
03 Oct 2016, 20:14

Which sample are you referring to?

Ideally, I would like to avoid using a FIX engine (too much bloat) and C# as I am just want to collect market data on my Linux based server.


@darhk

darhk
03 Oct 2016, 06:06

import socket

s = socket.socket()
logon = "8=FIX.4.4|9=113|35=A|49=ctrader.3139500|56=CSERVER|50=Quote|34=1|52=20161003-03:02:03.155|98=0|108=30|141=Y|553=3139500|554=pass|10=129|".replace('|', chr(0x01))

try:
    s.connect(('212.83.157.16', 5201))
    s.send(logon.encode(encoding='ascii'))
    msg = s.recv(1024)
    print("Message:", msg)
except:
    print("Connection failed.")
finally:
    s.close()

print("Script terminated.")

I changed some things up and I am finally getting a response from the server, but the response is just empty bytes (b'').


@darhk

darhk
02 Oct 2016, 22:45

I forgot to mention I am testing using a cTrader demo account.


@darhk