Skip to content

Commit

Permalink
Merge pull request #2 from FIXTradingCommunity/krishna01
Browse files Browse the repository at this point in the history
Sample Code for converting FIX to JSON
  • Loading branch information
Ktharnoju authored Nov 7, 2016
2 parents 361c690 + 82a9761 commit 1297b54
Show file tree
Hide file tree
Showing 6 changed files with 1,445 additions and 0 deletions.
91 changes: 91 additions & 0 deletions fix2json/logs/JsonOutput.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@

-----------------
{
"Header": {
"BeginString": "FIX.4.2",
"BodyLength": "132",
"MsgType": "D",
"MsgSeqNum": "16",
"SenderCompID": "BANZAI",
"SendingTime": "20160312-20:00:05.518",
"TargetCompID": "EXEC"
},
"Body":{
"ClOrdID": "1457812805394",
"HandlInst": "1",
"OrderQty": "100",
"OrdType": "1",
"Side": "1",
"Symbol": "VOD.L",
"TimeInForce": "0",
"TransactTime": "20160312-20:00:05.518"
},
"Trailer":{
"CheckSum": "198"
}
}
-----------------
{
"Header": {
"BeginString": "FIX.4.2",
"BodyLength": "74",
"MsgType": "A",
"MsgSeqNum": "138",
"SenderCompID": "FIXIMULATOR",
"SendingTime": "20080713-09:54:16.376",
"TargetCompID": "BANZAI"
},
"Body":{
"EncryptMethod": "0",
"HeartBtInt": "30"
},
"Trailer":{
"CheckSum": "129"
}
}
-----------------
{
"Header": {
"BeginString": "FIX.4.2",
"BodyLength": "194",
"MsgType": "6",
"MsgSeqNum": "141",
"SenderCompID": "FIXIMULATOR",
"SendingTime": "20080713-09:54:28.295",
"TargetCompID": "BANZAI"
},
"Body":{
"Currency": "USD",
"IDSource": "5",
"IOIid": "I1215942868296",
"IOIShares": "61000",
"IOITransType": "N",
"Price": "27.7884",
"SecurityID": "KPA.N",
"Side": "2",
"Symbol": "KPA",
"ValidUntilTime": "20080713-10:24:28.294",
"SecurityDesc": "INNKEEPERS USA TRUST",
"IOINaturalFlag": "N"
},
"Trailer":{
"CheckSum": "041"
}
}
-----------------
{
"Header": {
"BeginString": "FIX.4.2",
"BodyLength": "62",
"MsgType": "0",
"MsgSeqNum": "139",
"SenderCompID": "BANZAI",
"SendingTime": "20080713-09:54:46.592",
"TargetCompID": "FIXIMULATOR"
},
"Body":{
},
"Trailer":{
"CheckSum": "088"
}
}
4 changes: 4 additions & 0 deletions fix2json/res/SampleMessage.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
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
8=FIX.4.29=7435=A34=13849=FIXIMULATOR52=20080713-09:54:16.37656=BANZAI98=0108=3010=129
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
8=FIX.4.29=6235=034=13949=BANZAI52=20080713-09:54:46.59256=FIXIMULATOR10=088
Loading

0 comments on commit 1297b54

Please sign in to comment.