Skip to content

Commit 1297b54

Browse files
authored
Merge pull request #2 from FIXTradingCommunity/krishna01
Sample Code for converting FIX to JSON
2 parents 361c690 + 82a9761 commit 1297b54

File tree

6 files changed

+1445
-0
lines changed

6 files changed

+1445
-0
lines changed

fix2json/logs/JsonOutput.txt

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
2+
-----------------
3+
{
4+
"Header": {
5+
"BeginString": "FIX.4.2",
6+
"BodyLength": "132",
7+
"MsgType": "D",
8+
"MsgSeqNum": "16",
9+
"SenderCompID": "BANZAI",
10+
"SendingTime": "20160312-20:00:05.518",
11+
"TargetCompID": "EXEC"
12+
},
13+
"Body":{
14+
"ClOrdID": "1457812805394",
15+
"HandlInst": "1",
16+
"OrderQty": "100",
17+
"OrdType": "1",
18+
"Side": "1",
19+
"Symbol": "VOD.L",
20+
"TimeInForce": "0",
21+
"TransactTime": "20160312-20:00:05.518"
22+
},
23+
"Trailer":{
24+
"CheckSum": "198"
25+
}
26+
}
27+
-----------------
28+
{
29+
"Header": {
30+
"BeginString": "FIX.4.2",
31+
"BodyLength": "74",
32+
"MsgType": "A",
33+
"MsgSeqNum": "138",
34+
"SenderCompID": "FIXIMULATOR",
35+
"SendingTime": "20080713-09:54:16.376",
36+
"TargetCompID": "BANZAI"
37+
},
38+
"Body":{
39+
"EncryptMethod": "0",
40+
"HeartBtInt": "30"
41+
},
42+
"Trailer":{
43+
"CheckSum": "129"
44+
}
45+
}
46+
-----------------
47+
{
48+
"Header": {
49+
"BeginString": "FIX.4.2",
50+
"BodyLength": "194",
51+
"MsgType": "6",
52+
"MsgSeqNum": "141",
53+
"SenderCompID": "FIXIMULATOR",
54+
"SendingTime": "20080713-09:54:28.295",
55+
"TargetCompID": "BANZAI"
56+
},
57+
"Body":{
58+
"Currency": "USD",
59+
"IDSource": "5",
60+
"IOIid": "I1215942868296",
61+
"IOIShares": "61000",
62+
"IOITransType": "N",
63+
"Price": "27.7884",
64+
"SecurityID": "KPA.N",
65+
"Side": "2",
66+
"Symbol": "KPA",
67+
"ValidUntilTime": "20080713-10:24:28.294",
68+
"SecurityDesc": "INNKEEPERS USA TRUST",
69+
"IOINaturalFlag": "N"
70+
},
71+
"Trailer":{
72+
"CheckSum": "041"
73+
}
74+
}
75+
-----------------
76+
{
77+
"Header": {
78+
"BeginString": "FIX.4.2",
79+
"BodyLength": "62",
80+
"MsgType": "0",
81+
"MsgSeqNum": "139",
82+
"SenderCompID": "BANZAI",
83+
"SendingTime": "20080713-09:54:46.592",
84+
"TargetCompID": "FIXIMULATOR"
85+
},
86+
"Body":{
87+
},
88+
"Trailer":{
89+
"CheckSum": "088"
90+
}
91+
}

fix2json/res/SampleMessage.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
8=FIX.4.29=13235=D34=1649=BANZAI52=20160312-20:00:05.51856=EXEC11=145781280539421=138=10040=154=155=VOD.L59=060=20160312-20:00:05.51810=198
2+
8=FIX.4.29=7435=A34=13849=FIXIMULATOR52=20080713-09:54:16.37656=BANZAI98=0108=3010=129
3+
8=FIX.4.29=19435=634=14149=FIXIMULATOR52=20080713-09:54:28.29556=BANZAI15=USD22=523=I121594286829627=6100028=N44=27.788448=KPA.N54=255=KPA62=20080713-10:24:28.294107=INNKEEPERS USA TRUST130=N10=041
4+
8=FIX.4.29=6235=034=13949=BANZAI52=20080713-09:54:46.59256=FIXIMULATOR10=088

0 commit comments

Comments
 (0)