matiasdamelio / ROFEX_FIX

5 stars 3 forks source link

alternate broker adaptation #2

Open wyczolko opened 3 years ago

wyczolko commented 3 years ago

Good Morning Matias, Thank you, first and foremost, for this excellent module set. I am trying to adapt this to my current Wells Fargo Broker connection. I have changed FIX spec to 4.2, host IP and Port to as required by Wells , SenderCompID, TargetCompID as well as adding a required DeliverToCompID field in the configs but still can't create a successful connection. Could you tell me what other changes I might be missing in adapting this connection from ROFEX to my current UAT environment?

wyczolko commented 3 years ago

Specifically I am getting an immediate disconnect on logon attempt and see this is the logs: 20210524-15:06:28.000000000 : Connecting to ** on port ***** (Source :0) 20210524-15:06:28.000000000 : Initiated logon request 20210524-15:06:28.000000000 : Socket Error: Connection reset by peer. 20210524-15:06:28.000000000 : Disconnecting

The message sent: 8=FIX.4.2�9=75�35=A�34=1�49=**�52=20210524-14:58:00.000�56=**�98=0�108=30�10=179� connects with no issue in another connection script so its not the logon message. What might be the nature of the 'socket error' as I think thats the problem

matiasdamelio commented 3 years ago

Hi @wyczolko. Sorry for the delay. I'm glad you found it useful. In FIX 5.0 version, the DeliverToCompID field in administrative messages is not required, but I see that in version 4.2 it is. I have no way to test it, but I don't think the DeliverToCompID field is the reason why you can't connect.

The DeliverToCompID field is sent in the header, as follows:

header = msg.getHeader() header.setField(fix.DeliverToCompID('XXX'))