da4089 / simplefix

Simple FIX protocol implementation for Python
MIT License
233 stars 64 forks source link

Add support for ignoring leading/trailing junk when parsing messages #14

Open da4089 opened 6 years ago

da4089 commented 6 years ago

It's very common for FIX log files to be written with one message per line, and a direction (send/recv) and timestamp prior to the message.

It'd be nice if FixParser were able to parse such files "out of the box" without having to trim the lines manually first.

Add an optional FixParser behaviour to enable it to ignore spurious characters before the 8=FIX and after the 10=xxx|, such that it can read a FIX log file into a sequence of messages with a single call to append_buffer().

Pk13055 commented 5 years ago

Hi, what's the current status of this feature? This would be awesome to have ASAP, as it would help avoid most of the manual checks and truncation.

da4089 commented 5 years ago

Hi Pratik -- can you post a sample of the text you'd like to extract the message from? It'd be helpful to have some test cases for this functionality.