|
From: Christoph J. <chr...@ma...> - 2019-10-02 10:21:15
|
Hi, did you see my other mail on the list? Here again: ------ Hi Pavel, but I take it your session to LMAX could be established correctly and is exchanging heartbeats? Can you maybe post your message and event log of the relevant points in time? (please do not forget to remove passwords from FIX messages if there are any) Cheers, Chris. ---------- On 02.10.19 09:03, Pavel Tashev wrote: > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > > > > Hi, > > I use Quickfix/J to send requests to LMAX. Right after openning a new order LMAX disconnects me. > According to their support, my server sends TCP FIN. Here is a log from their server: > > 2019-09-27 UTC 12:54:39.830189 MY_IP ADDRESS > THEIR_IP_ADDRESS 8=TCP|35=FIN > > Why Quickfix/J (installed on my machine) sends a message of type FIN? Here is how I open a new order: > publicvoidsendNewOrderSingle(Stringp, charSideValue, charOrdTypeValue, doubleprice, > doubleOrderQty) throwsSessionNotFound { > System.out.println("\nNewOrderSingle"); > // Prepare > StringClOrdID=generateRandomString(20); > LocalDateTimenow=LocalDateTime.now(); > // Save data in Strategy > StrategySwitcher.setClOrdID(p, ClOrdID); > // Build and send request > quickfix.fix44.NewOrderSinglemessage=new quickfix.fix44.NewOrderSingle(); > message.setField(newClOrdID(ClOrdID)); //11 > message.setField(newSecurityID("4001")); //48 > message.setField(newSecurityIDSource("8")); //22 > message.setField(newSymbol(p)); //55 Ticker symbol > message.setField(newSide(SideValue)); //54 Side. 1 = Buy, 2 = Sell > message.setField(newExecInst("H")); > //18 H = Reinstate on System Failure (Do not cancel on disconnect); Q = Cancel on System Failure (Cancel on disconnect) > message.setField(newTransactTime(now)); > //60 Time this order request was initiated/released by the trader, trading system, or intermediary. Ignored by LMAX. > message.setField(newOrderQty(OrderQty)); //38 The number of contracts that an order is for. > message.setField(newOrdType(OrdTypeValue)); > //40 Order type. 1 = Market, 2 = Limit, 3 = Stop, 4 = Stop Limit > switch (String.valueOf(OrdTypeValue)) { > case"2":// LIMIT > message.setField(newPrice(price)); // 44 Price. Required for limit OrdTypes. > break; > case"3":// STOP > message.setField(newStopPx(price)); // 99 StopPx. Required for stop OrdTypes. > break; > } > message.setField(newTimeInForce(TimeInForceMap.get("GOOD_TILL_CANCEL"))); > // 59 Specifies how long the order remains in effect. 0 = Day (trading session), 1 = Good Till Cancel (GTC), 3 = Immediate or Cancel (IOC), 4 = Fill or Kill (FOK) > Session.sendToTarget(message, senderCompID, tradeTargetCompID); > } > > In my case: > SideValue => SELL which is 2 > OrdTypeValue => LIMIT which is 2 > > > > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users -- Christoph John Software Engineering T +49 241 557080-28 chr...@ma... MACD GmbH Oppenhoffallee 103 52066 Aachen, Germany www.macd.com Amtsgericht Aachen: HRB 8151 Ust.-Id: DE 813021663 Geschäftsführer: George Macdonald |