[This message was posted by Gert Van Tonder of Susquehanna Pacific PLC
<[email protected]> to the "4.0 Session" discussion forum at
http://fixprotocol.org/discuss/12. You can reply to it on-line at
http://fixprotocol.org/discuss/read/a6ec96e7 - PLEASE DO NOT REPLY BY MAIL.]
I am trying to send a simple NewOrderSingle message to my acceptor, in order to
test message response.
I have gotten the acceptor and initiator to establish a connection and send
heartbeat messages to one another, however when running the code below I get a
UnsupportedMessageType exception in the catch { } part.
"Error sending order:Exception of type 'QuickFix.UnsupportedMessageType' was
thrown."
I've looked at the documentation on quickfix but there's not much detail on
what could cause this error (well other than the message type is not
supported).
I found this code from an excample:
http://old.nabble.com/Newbie-problem-using-QuickFIX-and-sending-New-Order-signal-td21682738.html
and presume he wouldn't have posted it if it didn't work
Any help would be greatly appreciated.
Many thanks,
Gert
public void doNewOrderMessageTest()
{
//p93 in fix_doc pdf (fix42-with-errata ... )
//http://old.nabble.com/Newbie-problem-using-QuickFIX-and-sending-New-Order-signal-td21682738.html
QuickFix42.NewOrderSingle message = new QuickFix42.NewOrderSingle(
new ClOrdID(ClOrdIDGenerator()),
new HandlInst(HandlInst.AUTOMATED_EXECUTION_ORDER_PRIVATE),
new Symbol("WTF.AX"),
new Side(Side.BUY),
new TransactTime(DateTime.Now.ToUniversalTime()),
new OrdType(OrdType.MARKET));
message.setField(new OrderQty(100));
message.setField(new SecurityExchange("ASX"));
message.setField(new ExDestination("ASX"));
if(_connected)
sendOrder(message);
}
private void sendOrder(QuickFix42.Message order)
{
try
{
Session.sendToTarget(order, _sessionID);
}
catch (Exception ex)
{
Console.WriteLine("Error sending order:" + ex.Message);
}
}
[You can unsubscribe from this discussion group by sending a message to
mailto:[email protected]]
--
You received this message because you are subscribed to the Google Groups
"Financial Information eXchange" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fix-protocol?hl=en.