[Quickfix-developers] cqg configuration
Brought to you by:
orenmnero
From: Doug a. M. G. <dou...@gm...> - 2011-04-12 13:29:06
|
Does anyone have a working configuration file for connecting to CQG that you can share with me. I'm new to FIX, but I am an experienced C++ and open source developer. My current configuration file is below. I get the error "Configuration failed: No sessions defined for acceptor" I have also tried defining the [SESSION] with ConnectionType=acceptor. When I do that, the toAdmin() virtual function does not get called. I just made up the SocketAcceptPort number, I'm not sure if that is the right thing to do. The SocketConnectPort and SocketConnectHost was given to me by CQG. I'm not sure about the StartTime and EndTime; I trade the Euro currency 23 hours a day, so start and end times don't make much sense unless FIX understands starting at 6pm and stopping at 5pm. [DEFAULT] ConnectionType=initiator ReconnectInterval=60 FileStorePath=C:\GTG\FIX FileLogPath=C:\GTG\FIX\FIX.log SocketAcceptPort=53211 [SESSION] BeginString=FIX.4.2 DataDictionary=C:\GTG\FIX\FIX42.xml HeartBtInt=20 SocketConnectPort=6912 SocketConnectHost=demo.cqgtrader.com TargetCompID=CQG_Gateway SenderCompID=[my cqg user] SenderSubID=Test FIX StartTime=00:00:00 EndTime=23:59:59 Since the toAdmin() function isn't getting called, the content of that function is moot at this point. But this is what I have: void CFIX::toAdmin(FIX::Message& message, const FIX::SessionID& id) { m_pAPI->Log("toAdmin"); if (FIX::MsgType_Logon == FIELD_GET_REF(message.getHeader(), MsgType)) { FIX::RawData field_rawData("mycqgpass"); FIX::RawData field_userName("myfixuser"); FIX::RawData field_password("myfixpass"); message.setField(field_rawData); message.setField(field_userName); message.setField(field_password); } } Any help is much appreciated. Thanks! Doug Green douggreenconsulting.com dou...@do... dou...@gm... |