da4089 / simplefix

Simple FIX protocol implementation for Python
MIT License
229 stars 63 forks source link

Add support for parsing with alternative field separators #15

Open da4089 opened 6 years ago

da4089 commented 6 years ago

FIX uses the ASCII SOH character to separate (well, maybe terminate) fields. But for human consumption, these are often replaced with, eg. | when logging messages.

Add optional support for parsing messages using non-standard separators.

zoakes commented 4 years ago

The FIX client I'm trying to connect to will not allow the |||'s, is there any way to remove the pipes?, replace them with spaces -- I tried using str(msg).replace('|', ' ') with no luck...

da4089 commented 4 years ago

Sorry, I don't understand what you're trying to do here. Normally, pipes are used only for logging (so that humans can read the messages), but proper FIX protocol uses ASCII SOH characters.

Can you explain in a little more detail? Or maybe a snippet of the code?

zoakes commented 4 years ago

Yeah I realized after sending this that it only uses the pipes in parse, not the actual encoded message. Testing again today, I’ll delete this if it runs as I expect it to — sorry about that!

-- Yep, it's only in the parsed messages (not in the actual sent encoding).

I did come upon another question, is it possible to manually change the order ? I've been adding items as needed (for IB) to the header, but I guess they want a specific order that this isn't producing -- I was thinking of just encoding that portion as a string, appending, and trying that. IB is driving me insane, but once I have a working FIX engine (w/ simplefix) for logOn, HB, and logOff I was going to post it for public use, or push it as a feature if desired.

Zach


From: David Arnold notifications@github.com Sent: Thursday, December 19, 2019 5:53:43 AM To: da4089/simplefix simplefix@noreply.github.com Cc: Zach Mazz zach_oakes@outlook.com; Comment comment@noreply.github.com Subject: Re: [da4089/simplefix] Add support for parsing with alternative field separators (#15)

Sorry, I don't understand what you're trying to do here. Normally, pipes are used only for logging (so that humans can read the messages), but proper FIX protocol uses ASCII SOH characters.

Can you explain in a little more detail? Or maybe a snippet of the code?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fda4089%2Fsimplefix%2Fissues%2F15%3Femail_source%3Dnotifications%26email_token%3DALPUCIFLTDR5EJFLOQKZRP3QZNOEPA5CNFSM4E3FVITKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHJL3TI%23issuecomment-567459277&data=02%7C01%7C%7Ce9278a0f8d544da6fdc108d7847a1956%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637123532249614947&sdata=vxHvQZblcytPFRdoEcViFwj95avjYqboM4iOYNNq3EU%3D&reserved=0, or unsubscribehttps://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FALPUCIFJ73Z2VWVKRDYZIWTQZNOEPANCNFSM4E3FVITA&data=02%7C01%7C%7Ce9278a0f8d544da6fdc108d7847a1956%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637123532249614947&sdata=Y%2FILOgcqJMXSdgNpv105xHJ8pfHrQcdblocJHaZi%2B6Q%3D&reserved=0.