user5620472
user5620472

Reputation: 2882

quickfix create order and send to currenex

I create:

quickfix.fix44.NewOrderSingle order = new quickfix.fix44.NewOrderSingle();

fill it:

    order.set(new ClOrdID(String.valueOf(orderDomain.getOrderId())));
    order.set(new Product(Product.CURRENCY));
    order.set(new TransactTime(new Date()));
    ...

And I need send it to currenex:

Session.sendToTarget(order, sessionID);

But I have 2 questions:

  1. How can I create sessionID? Now I do it

    SessionID sessionID = new SessionID("FIX.4.4:INITIATOR->INITIATOR"); But I do not understand what I did here

  2. How (and where) can I configure host/user/pasword?

Upvotes: 0

Views: 552

Answers (1)

rupweb
rupweb

Reputation: 3328

QuickFix sessionID's are contained in a HashSet<SessionID> which you can get from using i.GetSessionIDs(); for a given IInitiator i.

Then you can get a session instance by using Session.LookupSession(sessionID)

What you're doing which is manually creating a sessionID which is basically setting up the message Header information.

Upvotes: 1

Related Questions