Search code examples
quickfixj

Is there a method in quickfix for returning execution report acknowledgement message?


I have initiator and acceptor applications in Java. I'm using FIX 4.2 protocol.

I'm sending Execution Reports via acceptor and getting them with initiator. There's no problem in here. What I need is, return an execution report acknowledgement message(type: BN) for the acceptor. In FIX 4.2 standarts there are no BN messages. I will probably add those fields to datadictionary myself.

I checked user manual of quickfix. There are some example methods for sending messages.

void sendOrderCancelRequest() throws SessionNotFound
{
  quickfix.fix41.OrderCancelRequest message = new quickfix.fix41.OrderCancelRequest(
    new OrigClOrdID("123"),
    new ClOrdID("321"),
    new Symbol("LNUX"),
    new Side(Side.BUY));

  message.set(new Text("Cancel My Order!"));

  Session.sendToTarget(message, "TW", "TARGET");
}    

Should i write a method like above and call it inside of onMessage method? How can I response these messages?


Solution

  • QF does not automatically do this for you.

    You will need to implement your own logic to create the ack message and send it.

    And yes, you are correct that you will need to add BN and its fields to your DataDictionary. I would then recommend that you re-generate the QF/j source and rebuild the library so that you can have proper BN message/field classes. (The QF/j documentation should be able to guide you with this.)