QuickFix c++ 不支持的消息类型
QuickFix c++ Unsupported message type
我正在使用 QuickFix 在 C++ 中开发一个机器人,使用 Remarkets 来测试我的应用程序,但是 我的 quickfix 引擎在我破解它们时几乎拒绝了所有消息。
收到消息:
8=FIXT.1.1|9=116|35=h|34=3|49=ROFX|52=20201026-17:11:49.665|56=user|325=Y|335=NONE|336=[N/A]|340=2|1300=DDA|1301=ROFX|10=228|
我(客户端)发送给服务器的消息:
8=FIXT.1.1|9=118|35=j|34=4|49=user|52=20201026-17:11:52.374|56=ROFX|45=3|58=Unsupported Message Type|372=h|380=3|1137=9|10=168|
Application.h
...
void onMessage( const FIX50::TradingSessionStatus& M, const FIX::SessionID& S)
throw( FIX::FieldNotFound,
FIX::IncorrectDataFormat,
FIX::IncorrectTagValue,
FIX::UnsupportedMessageType );
...
Application.cpp:
void Application::fromApp(const FIX::Message& message,
const FIX::SessionID& sessionID )
throw(FIX::FieldNotFound,
FIX::IncorrectDataFormat,
FIX::IncorrectTagValue,
FIX::UnsupportedMessageType)
{
crack( message, sessionID );
}
void Application::onMessage
( const FIX50::TradingSessionStatus& M, const FIX::SessionID& S)
throw( FIX::FieldNotFound,
FIX::IncorrectDataFormat,
FIX::IncorrectTagValue,
FIX::UnsupportedMessageType )
{
std::cout << "MENSAJE H";
}
FIXT11.xml:
<value enum='h' description='TRADING_SESSION_STATUS'/>
FIX50SP2.xml:
<message name='TradingSessionStatus' msgtype='h' msgcat='app'>
<component name='ApplicationSequenceControl' required='N' />
<field name='TradSesReqID' required='N' />
<field name='MarketID' required='N' />
<field name='MarketSegmentID' required='N' />
<field name='TradingSessionID' required='Y' />
<field name='TradingSessionSubID' required='N' />
<field name='TradSesMethod' required='N' />
<field name='TradSesMode' required='N' />
<field name='UnsolicitedIndicator' required='N' />
<field name='TradSesStatus' required='Y' />
<field name='TradSesEvent' required='N' />
<field name='TradSesStatusRejReason' required='N' />
<field name='TradSesStartTime' required='N' />
<field name='TradSesOpenTime' required='N' />
<field name='TradSesPreCloseTime' required='N' />
<field name='TradSesCloseTime' required='N' />
<field name='TradSesEndTime' required='N' />
<field name='TotalVolumeTraded' required='N' />
<field name='Text' required='N' />
<field name='EncodedTextLen' required='N' />
<field name='EncodedText' required='N' />
<component name='Instrument' required='N' />
</message>
配置文件:
UseDataDictionary=Y
我是否正确覆盖了“onMessage”?
拒绝的原因可能是什么?
我发现 post有类似的问题,他通过更新quickfix解决了。我用的是官网下载的1.15.1版本
感谢克里斯托弗·约翰!!
我正在为 FIX50 覆盖 onMessage,我需要为 FIX50SP2 覆盖它。
原文:
void onMessage( const FIX50::TradingSessionStatus& M, const FIX::SessionID& S)
throw( FIX::FieldNotFound,
FIX::IncorrectDataFormat,
FIX::IncorrectTagValue,
FIX::UnsupportedMessageType );
已修改,正在运行:
void onMessage( const FIX50SP2::TradingSessionStatus& M, const FIX::SessionID& S)
throw( FIX::FieldNotFound,
FIX::IncorrectDataFormat,
FIX::IncorrectTagValue,
FIX::UnsupportedMessageType );
我正在使用 QuickFix 在 C++ 中开发一个机器人,使用 Remarkets 来测试我的应用程序,但是 我的 quickfix 引擎在我破解它们时几乎拒绝了所有消息。
收到消息:
8=FIXT.1.1|9=116|35=h|34=3|49=ROFX|52=20201026-17:11:49.665|56=user|325=Y|335=NONE|336=[N/A]|340=2|1300=DDA|1301=ROFX|10=228|
我(客户端)发送给服务器的消息:
8=FIXT.1.1|9=118|35=j|34=4|49=user|52=20201026-17:11:52.374|56=ROFX|45=3|58=Unsupported Message Type|372=h|380=3|1137=9|10=168|
Application.h
...
void onMessage( const FIX50::TradingSessionStatus& M, const FIX::SessionID& S)
throw( FIX::FieldNotFound,
FIX::IncorrectDataFormat,
FIX::IncorrectTagValue,
FIX::UnsupportedMessageType );
...
Application.cpp:
void Application::fromApp(const FIX::Message& message,
const FIX::SessionID& sessionID )
throw(FIX::FieldNotFound,
FIX::IncorrectDataFormat,
FIX::IncorrectTagValue,
FIX::UnsupportedMessageType)
{
crack( message, sessionID );
}
void Application::onMessage
( const FIX50::TradingSessionStatus& M, const FIX::SessionID& S)
throw( FIX::FieldNotFound,
FIX::IncorrectDataFormat,
FIX::IncorrectTagValue,
FIX::UnsupportedMessageType )
{
std::cout << "MENSAJE H";
}
FIXT11.xml:
<value enum='h' description='TRADING_SESSION_STATUS'/>
FIX50SP2.xml:
<message name='TradingSessionStatus' msgtype='h' msgcat='app'>
<component name='ApplicationSequenceControl' required='N' />
<field name='TradSesReqID' required='N' />
<field name='MarketID' required='N' />
<field name='MarketSegmentID' required='N' />
<field name='TradingSessionID' required='Y' />
<field name='TradingSessionSubID' required='N' />
<field name='TradSesMethod' required='N' />
<field name='TradSesMode' required='N' />
<field name='UnsolicitedIndicator' required='N' />
<field name='TradSesStatus' required='Y' />
<field name='TradSesEvent' required='N' />
<field name='TradSesStatusRejReason' required='N' />
<field name='TradSesStartTime' required='N' />
<field name='TradSesOpenTime' required='N' />
<field name='TradSesPreCloseTime' required='N' />
<field name='TradSesCloseTime' required='N' />
<field name='TradSesEndTime' required='N' />
<field name='TotalVolumeTraded' required='N' />
<field name='Text' required='N' />
<field name='EncodedTextLen' required='N' />
<field name='EncodedText' required='N' />
<component name='Instrument' required='N' />
</message>
配置文件:
UseDataDictionary=Y
我是否正确覆盖了“onMessage”? 拒绝的原因可能是什么?
我发现
感谢克里斯托弗·约翰!!
我正在为 FIX50 覆盖 onMessage,我需要为 FIX50SP2 覆盖它。
原文:
void onMessage( const FIX50::TradingSessionStatus& M, const FIX::SessionID& S)
throw( FIX::FieldNotFound,
FIX::IncorrectDataFormat,
FIX::IncorrectTagValue,
FIX::UnsupportedMessageType );
已修改,正在运行:
void onMessage( const FIX50SP2::TradingSessionStatus& M, const FIX::SessionID& S)
throw( FIX::FieldNotFound,
FIX::IncorrectDataFormat,
FIX::IncorrectTagValue,
FIX::UnsupportedMessageType );