Coder Social home page Coder Social logo

maxim2266 / fullfix Goto Github PK

View Code? Open in Web Editor NEW
66.0 13.0 21.0 125 KB

A library for parsing FIX (Financial Information eXchange) protocol messages.

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.86% C 84.05% Python 15.09%
linux parsing c finance hft information-exchange financilal-information fix-protocol fix

fullfix's People

Contributors

maxim2266 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fullfix's Issues

Do you expect this to work on Windows Subsystem for Linux?

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!

Having Trouble Parsing a single Message

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!

Stable Release

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.