maxim2266 / fullfix Goto Github PK
View Code? Open in Web Editor NEWA library for parsing FIX (Financial Information eXchange) protocol messages.
License: BSD 3-Clause "New" or "Revised" License
A library for parsing FIX (Financial Information eXchange) protocol messages.
License: BSD 3-Clause "New" or "Revised" License
I'm currently working on a project to parse log files full of FIX messages and create an orderbook from them. Most of my messages are of the form MarketDataFullRefresh and those are the ones I'm primarily concerned with.
I tried to build and run this on Windows and as expected it didn't work out because the code uses some Linux primitives. I'm curious if this will work on WSL2, however, as most of my infra is Windows based and I want to be prepared if I need to migrate it all to Linux.
Sidenote: I was able to build and run the FFP Repo in Windows but it doesn't have the functionality to build the parser tree from an XML spec.
Thanks!
I tried to write a toy program that uses the library to parse a single FIX message.
Included "fix.h" and FIX44.h (which got created from the complie-spec).
Created a parser_context structure:
typedef struct
{
fix_parser* parser;
}parser_context;
Wrote a simple parsing function:
int parse(parser_context* context, const void* buff, unsigned n)
{
// const fix_parser_result* res =get_first_fix_message(context->parser, buff, n);
// printf("%d", res->msg_type_code);
for(const fix_parser_result* res =get_first_fix_message(context->parser, buff, n);
res != NULL;
res = get_next_fix_message(context->parser))
{printf("Entered Loop");
if(res->error.code == FE_OK)
printf("Parsing Successful");
else
printf(CParsing Failed");
}
free_fix_parser(context-> parser);
return 1;
}
Instantiated the context in main:
int main()
{
parser_context* f1 = malloc(sizeof(parser_context));
f1->parser = create_FIX44_parser(); //This constructor was created by compile-spec
char buffer[1000];
printf("Enter the FIX message");
fgets(buffer, 1000, stdin);
parse(f1, buffer, strlen(buffer));
return 0;
}
In the standard input, I provided the following FIX message:
8=FIX.4.4\x019=178\x0135=D\x0149=SenderCompID\x0156=TargetCompID\x0134=1122\x0152=20210907-09:30:00.000\x0111=12345\x0121=1\x0155=MSFT\x0154=1\x0160=20210907-09:30:00.000\x0138=100\x0140=2\x0144=300.00\x0159=0\x0110=128\x01
The program never entered the for loop in the parse function.
To check what was happening, I uncommented the first two lines in the parse function to see what the parser was returning.
res->msg_type_code and even trying to print the error code both returned seg faults.
Is there any modification I should be making to my implementation?
Thanks!
Line 259 in 1a05b54
Hello Maxim,
First of all: Thank you for your hard work.
I'm planning to use FullFIX for a mid-large research project and am therefore highly interested in getting this to stable status.
Are there any todos on your list regarding functionality (or anything else) of this library? How could the community be of help?
-- Tas
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.