需要FIX解析器的示例程序

时间:2014-01-22 03:40:08

标签: quickfixj

我必须编写一个Java程序。我需要解析FIX格式的内容。我在google / stackoverflow上看到很多用于解析FIX消息的链接。但他们都使用quickfix / J或者有一些Java程序,但他们正在阅读特定类型的FIX消息。

请帮助我以简单的方式用Java解析我的FIX内容。

内容:

  

8 = FIX.4.4_9 = 1439_35 = R_34 = 159_49 = SENDERCOMPID1_52 = 20131216-13:37:16.302_56 = WFS_XYZ_TEST_12345_DLRDPL_131 = TRD_20131216_WFS_TRSY_1_4_1_146 = 1_55 = [N / A] _60 = 20131216-13:37:16_75 = 20131216_464 = Y_5745 = 1_828 = 57_5766 = BMKSWITCH_453 = 3_448 = wfscust13_447 = C_452 = 3_802 = 4_523 =好   Customer13_803 = 2_523 = NY_803 = 25_523 = US_803 = 4000_523 = 94039005_803 = 4001_448 =韦尔斯   法戈测试   Customer_447 = C_452 = 1_802 = 2_523 = DJ10_803 = 4002_523 = NO_803 = 4003_448 = Bilateral_447 = C_452 = 4_555 = 2_600 =   1 11/30/19   7yr_602 = 912828UB4_603 = 1_607 = 6_609 = TNOTE_611 = 20191130_249 = 20121130_615 = 1_624 = 1_556 = USD_588 = 20121220_686 = 1_685 = 25720000_824 = TRD_TRSY_1_566 = 98.484375_600 = 7   是对阵3M   LIBOR_602 = RU00007YL3MS_603 = 8_607 = 12_609 = IRSUSD_764 = BMK_611 = 20191221_624 = P_556 = USD_588 = 20121221_677 = LIBOR_678 = 3M_686 = 6_685 = 25000000_824 = TRD_XYZ_1_566 = 1.32581_539 = 1_524 = Bilateral_525 = C_538 = 4_10 = 141

1 个答案:

答案 0 :(得分:0)

QuickfixJ是要走的路。这将使您可以灵活地解析任何FIX消息,并支持具有重复组的消息。如果您只是使用Java来解析FIX,请记住很难解析可能包含重复组的消息。

您只需要扩展QuickfixJ的MessageCracker类。

http://www.quickfixj.org/quickfixj/usermanual/1.5.3/usage/receiving_messages.html