Search code examples
quickfix

QuickFix and SessionSettings


I am working with a python implementation of quickfix. http://www.quickfixengine.org

I would like to set SocketConnectHost other than via the configuration '.ini' file, but have not discovered how to do this.

I have discovered that the SessionSettings class has a member SOCKET_CONNECT_HOST, but I don't seem able to 'set' this other than via the '.ini' file.

Nor can I see how to 'get' members individually either.

Printing a string representation of a SessionSettings instance gives a C++ ish reference to a location in memory and...

<quickfix.SessionSettings; proxy of <Swig Object of type 'FIX::SessionSettings' at 0x7f5a1c1333390>.

So it looks like the SessionSettings stuff is being handled in the C++ quickfix engine layer.

Can I get or set just SocketConnectHost from python?

Thanks, Ben


Solution

  • I can't speak for Python, but there's a SessionSettings instance you need to create a SocketInitiator.

    Usually you would create this instance from the QuickFIX configuration file. After initializing it from the configuration file, you can change settings with the setter methods, eg SessionSettings.setString(SessionID s, String key, String value). The key would be SocketConnectHost in your case.