-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Socket connection? #22
Comments
Hi Zach, At one time I was fairly opposed to this idea. I think it's a slippery slope from adding some sort of socket support, and then maybe some sort of message validation, and suddenly we're back where QuickFIX is. But I'm maybe less against it than I was, mostly because I think a lot of people end up having to write it themselves, and while that's not terribly hard, it does seem like maybe an off-the-shelf way to do it would be better. So. This is maybe a little unfair, but I'd kinda be interested in seeing what you come up with, without really promising to merge the PR if I get cold feet. But ... since you're writing it anyway, and since you're kinda volunteering, I'm absolutely happy to look at a PR and work with you on merging it if it seems promising? |
Sure. Well mine is very simple, but I’m happy to send.
I have it on a git, in the Socket+ branch (with generic connection now)
https://github.com/zoakes/sFIX-IB/blob/Socket%2B/SFX_Sock.py
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: David Arnold <[email protected]>
Sent: Monday, November 25, 2019 5:51:27 AM
To: da4089/simplefix <[email protected]>
Cc: Zach Mazz <[email protected]>; Author <[email protected]>
Subject: Re: [da4089/simplefix] Add Socket connection? (#22)
Hi Zach,
At one time I was fairly opposed to this idea. I think it's a slippery slope from adding some sort of socket support, and then maybe some sort of message validation, and suddenly we're back where QuickFIX is.
But I'm maybe less against it than I was, mostly because I think a lot of people end up having to write it themselves, and while that's not terribly hard, it does seem like maybe an off-the-shelf way to do it would be better.
So. This is maybe a little unfair, but I'd kinda be interested in seeing what you come up with, without really promising to merge the PR if I get cold feet. But ... since you're writing it anyway, and since you're kinda volunteering, I'm absolutely happy to look at a PR and work with you on merging it if it seems promising?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fda4089%2Fsimplefix%2Fissues%2F22%3Femail_source%3Dnotifications%26email_token%3DALPUCIEUIL46AETWA7SWCXTQVO337A5CNFSM4JRBVJR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFCEFJY%23issuecomment-558121639&data=02%7C01%7C%7Cdf980eb5c15b4fedf91608d7719dcde3%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637102794878485564&sdata=FqC8p1RV3EcWV1Ec%2Fn9Ttc9XFCvtjOHQLpJA%2Fi3DRnY%3D&reserved=0>, or unsubscribe<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FALPUCIEKPYLDVTVDRO6QRYLQVO337ANCNFSM4JRBVJRQ&data=02%7C01%7C%7Cdf980eb5c15b4fedf91608d7719dcde3%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637102794878495563&sdata=MB9bDfg9aRECiuBRO8igHI5E%2Bh3YvCW%2B86GafyIJqRU%3D&reserved=0>.
|
It’s far from QuickFix haha — I like simple too. QF is just so bloated, and their documentation is terrible. I hate QF.
Also — I realize I need to remove the finally’s to the very bottom to keep connection open (in sendAll) — just was benchmarking and can’t if it’s running continuously.
Goal was the most minimal connection to IB’s FIX protocol.
Zach
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Zach Oakes <[email protected]>
Sent: Monday, November 25, 2019 7:36:31 AM
To: da4089/simplefix <[email protected]>; da4089/simplefix <[email protected]>
Cc: Author <[email protected]>
Subject: Re: [da4089/simplefix] Add Socket connection? (#22)
Sure. Well mine is very simple, but I’m happy to send.
I have it on a git, in the Socket+ branch (with generic connection now)
https://github.com/zoakes/sFIX-IB/blob/Socket%2B/SFX_Sock.py
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: David Arnold <[email protected]>
Sent: Monday, November 25, 2019 5:51:27 AM
To: da4089/simplefix <[email protected]>
Cc: Zach Mazz <[email protected]>; Author <[email protected]>
Subject: Re: [da4089/simplefix] Add Socket connection? (#22)
Hi Zach,
At one time I was fairly opposed to this idea. I think it's a slippery slope from adding some sort of socket support, and then maybe some sort of message validation, and suddenly we're back where QuickFIX is.
But I'm maybe less against it than I was, mostly because I think a lot of people end up having to write it themselves, and while that's not terribly hard, it does seem like maybe an off-the-shelf way to do it would be better.
So. This is maybe a little unfair, but I'd kinda be interested in seeing what you come up with, without really promising to merge the PR if I get cold feet. But ... since you're writing it anyway, and since you're kinda volunteering, I'm absolutely happy to look at a PR and work with you on merging it if it seems promising?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fda4089%2Fsimplefix%2Fissues%2F22%3Femail_source%3Dnotifications%26email_token%3DALPUCIEUIL46AETWA7SWCXTQVO337A5CNFSM4JRBVJR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFCEFJY%23issuecomment-558121639&data=02%7C01%7C%7Cdf980eb5c15b4fedf91608d7719dcde3%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637102794878485564&sdata=FqC8p1RV3EcWV1Ec%2Fn9Ttc9XFCvtjOHQLpJA%2Fi3DRnY%3D&reserved=0>, or unsubscribe<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FALPUCIEKPYLDVTVDRO6QRYLQVO337ANCNFSM4JRBVJRQ&data=02%7C01%7C%7Cdf980eb5c15b4fedf91608d7719dcde3%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637102794878495563&sdata=MB9bDfg9aRECiuBRO8igHI5E%2Bh3YvCW%2B86GafyIJqRU%3D&reserved=0>.
|
I added some stuff that most people would probably want -- like heartbeat, logging, etc. I think for now I'm done, this worked for me today in some preliminary testing, so I'm pretty pleased hah. I expected this fix engine to take like.. weeks-months, so thank you for saving me that : ) I'm happy to work with you on the PR (pull request?) -- I'm not super familiar with all the github ins and outs, but I'm a solid developer. If it's beginning to feel a bit like QF, no need to merge -- I'm indifferent, really I'm happy I have that makes sense and works well in a few hundred lines. Let me know ! Thank you again for this incredible module. Zach |
David, I finished a really clean Python FIX client with simplefix -- I'll attach the current version here. I finally finished up integrating / testing with Interactive Brokers IB CTCI FIX API, they are incredibly particular about what's used, what isn't, what's in header, etc -- but it's ready now! https://github.com/zoakes/sFIX-IB/blob/master/base_hb_v2.0.py I didn't add any message validation, I'm not quite sure how to aside from just using a listener -- which sounds bloated. If it is something you're interested in I can give it a try though. |
I will definitely have a look at this. I'm still unsure how I'd like to integrate it, but at a minimum, it could be in some sort of example code directory. The next couple of weeks are a little busy, but I should get a chance to look at it after that. Thank you for this! |
Thanks, David :) |
My code was pretty minimal — more scaffolding to build out your own spec with if I recall.
Honestly, there’s a lot of FIX overhead in maintaining connectivity, and with the new FIX5 / SP stuff (session and transport layer split), it’s even more substantial.
I can run over it again, but I didn’t intend this to be merged into main.
If you find use in it, go for it of course :)
I’m guessing something generic that applies + passes cert at various FIX endpoints would be substantially larger — and not really fit with the idea here.
We run FIX at CME on ILink3 and it’s like thousands of lines of code to maintain connectivity, persist messages for reconnect / disconnect / reconciling msg counts, etc.
it’s not small.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: David Arnold ***@***.***>
Sent: Wednesday, April 5, 2023 9:07:19 AM
To: da4089/simplefix ***@***.***>
Cc: Zach Mazz ***@***.***>; Mention ***@***.***>
Subject: Re: [da4089/simplefix] Add Socket connection? (#22)
I will definitely have a look at this. I'm still unsure how I'd like to integrate it, but at a minimum, it could be in some sort of example code directory. The next couple of weeks are a little busy, but I should get a chance to look at it after that.
Thank you for this!
—
Reply to this email directly, view it on GitHub<#22 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALPUCIEQVKBBXHKGDIP4UUTW7V4BPANCNFSM4JRBVJRQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
For better or worse, there's not a lot of usage of the new session layer stuff that I've seen: most FIX is still using the classic session protocol and some variant of FIX4.x. But yes, a production quality FIX engine is a heap of work. In most cases, you'd probably be better off starting with the Python QuickFIX or WTFIX if that's what you need. That said, something that's reasonably resilient and suitable for running regression tests, etc, isn't too much effort. |
@da4089 I am looking for a solution for a Non-production environment. Most a Test environment. |
Yep. Even then -- quickfix doesn’t handle the new ‘split layer’ ILink3 stuff, or doesn’t publish anything implying they can.
We ended up building one, but it took months.
For basic stuff, sure – could be fairly minimal. Just a heartbeat, some other minimal overhead.
If you want something to truly manage a prod level OMS / MD connection – it will quickly look like QuickFix. If that was the goal, I’d say this probably deviates from the ‘simple’ goal of the library.
Also of note – many of the paid FIX engine players barely have FIX5 / SP stuff working / tested.
CME is shifting entirely to ILink3 in 2024, phasing out ILink2 now (FIX4), but no new connections can use FIX4 for example. It’s a bit of a unique time in FIX software where everyone w DMA is preparing to scramble or break.
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: David ***@***.***>
Sent: Wednesday, April 5, 2023 9:29 AM
To: ***@***.***>
Cc: Zach ***@***.***>; ***@***.***>
Subject: Re: [da4089/simplefix] Add Socket connection? (#22)
For better or worse, there's not a lot of usage of the new session layer stuff that I've seen: most FIX is still using the classic session protocol and some variant of FIX4.x.
But yes, a production quality FIX engine is a heap of work. In most cases, you'd probably be better off starting with the Python QuickFIX or WTFIX if that's what you need.
That said, something that's reasonably resilient and suitable for running regression tests, etc, isn't too much effort.
—
Reply to this email directly, view it on GitHub<#22 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALPUCICFLYG67APDUWZMB3LW7V6VBANCNFSM4JRBVJRQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
How can you make a network connection… as in how do you handle it from a software perspective?
or how do you get the connectivity?
Software is fairly simple – the connectivity maybe not. DMA will run in the hundreds of thousands. Some brokers offer FIX alternatives to REST stuff, like IB, but that’s sort of FIX – lite.
Just depends, but you’ll likely need to bring some $ to the table for anyone to certify with you.
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: Zach ***@***.***>
Sent: Wednesday, April 5, 2023 11:23 AM
To: ***@***.***>; ***@***.***>
Cc: ***@***.***>
Subject: RE: [da4089/simplefix] Add Socket connection? (#22)
Yep. Even then -- quickfix doesn’t handle the new ‘split layer’ ILink3 stuff, or doesn’t publish anything implying they can.
We ended up building one, but it took months.
For basic stuff, sure – could be fairly minimal. Just a heartbeat, some other minimal overhead.
If you want something to truly manage a prod level OMS / MD connection – it will quickly look like QuickFix. If that was the goal, I’d say this probably deviates from the ‘simple’ goal of the library.
Also of note – many of the paid FIX engine players barely have FIX5 / SP stuff working / tested.
CME is shifting entirely to ILink3 in 2024, phasing out ILink2 now (FIX4), but no new connections can use FIX4 for example. It’s a bit of a unique time in FIX software where everyone w DMA is preparing to scramble or break.
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: David ***@***.***>
Sent: Wednesday, April 5, 2023 9:29 AM
To: ***@***.***>
Cc: Zach ***@***.***>; ***@***.***>
Subject: Re: [da4089/simplefix] Add Socket connection? (#22)
For better or worse, there's not a lot of usage of the new session layer stuff that I've seen: most FIX is still using the classic session protocol and some variant of FIX4.x.
But yes, a production quality FIX engine is a heap of work. In most cases, you'd probably be better off starting with the Python QuickFIX or WTFIX if that's what you need.
That said, something that's reasonably resilient and suitable for running regression tests, etc, isn't too much effort.
—
Reply to this email directly, view it on GitHub<#22 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALPUCICFLYG67APDUWZMB3LW7V6VBANCNFSM4JRBVJRQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@zoakes To make a connection with the backend engine, a socket can be used to communicate with the bundle. Ip address, Port, Target & Sender comp Id, Target Sub ID, User address and password. The above information can be used to make a network connection. |
These requirements are all set per endpoint.
There’s a certification process involved with most? (All?), all I’ve connected to. Depends on where you are connecting.
I’ll also say the VPN / VPC requirements for many of these aren’t trivial either.
To get access to this whole environment , usually a matter of $$.
There’s minimum volumes, or account sizes, etc,
So like… CME connectivity requires I think $1M account size, 10k contracts/mo, something.
It may also require membership, unsure.
We have membership, unsure if that’s a req.
Easier routes would be broker fix, IB, probably 100k requirement.
TT is another one, but that’s like 3k/mo ish.
It’s really just going to require $ in all the US Equities / Futures endpoints I’m familiar with. Maybe there’s some FX or digital stuff that’s ‘free’ and easier, don’t know.
I recall darwinex had an endpoint but closed it to new users.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Harry ***@***.***>
Sent: Wednesday, April 5, 2023 12:34:16 PM
To: da4089/simplefix ***@***.***>
Cc: Zach Mazz ***@***.***>; Mention ***@***.***>
Subject: Re: [da4089/simplefix] Add Socket connection? (#22)
@zoakes<https://github.com/zoakes> To make a connection with the backend engine, a socket can be used to communicate with the bundle.
Ip address, Port, Target & Sender comp Id, Target Sub ID, User address and password
How can you make a network connection… as in how do you handle it from a software perspective?
or how do you get the connectivity?
—
Reply to this email directly, view it on GitHub<#22 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALPUCIEOY7EWUU4CBREQIRDW7WUJRANCNFSM4JRBVJRQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@zoakes I do not think regression testing needs that much $$. Do you have a solution for that? |
Sure, you can mock a FIX endpoint. Quickfix has one ready to go, though you'll need to hard code various behaviors into it to sort of 'mock' the behavior you expect wrt resets, rejections, sessions, etc. There's lots of nuance, even in mocking expected venue behavior / state. To connect to a real endpoint (for any form of real testing), I think you will need to pass certification & fully integrate for the given endpoint. In modern fix, that means a multicast VPN, and multiple sessions for various 'cert specific' products. That's always been the case for me. Real fix is complicated, and the certifications require handling a lot of edge cases. I don't really see the point of testing the robustness of a mocked connection, personally, but that's just me. |
Hello, there! |
What are you trying to achieve? |
My end goal is to create a connection with the mt5 server or you can say a liquidity provider. For it, I must have a clear understanding of FIX API and how it will work. |
Not following... I don't think MT5 has FIX, I don't know why they would. Some brokers provide endpoints that can then route to many venues -- trading technologies, interactive brokers. I don't know where a trading platform would come in. I see no mention of mt5 offering a fix endpoint, don't see what purpose it would serve their users. |
Exactly, I will get an endpoint from the broker. I wanted to get market feed data and other order sending on it etc. If you could please look into this repository it is what exactly I want but it is an old repository which is not working now. |
Python quickfix works fine. FIX is complicated, and very not generic -- if it doesn't work you're likely not meeting their spec, or aren't permissioned to hit the endpoint. Most brokers have a UAT environment, and onboarding process to use it that you must pass. Of note -- this is not quickfix. This repo is more 'I want to build my own fix client, to replace Quickfix, and just don't want to do the message parsing / creation myself' Also of note -- 9/10 times I hear this, someone is interested in latency. Fix is NOT inherently faster, and unless in newer binary formats it's most likely going to offer SLOWER execution speed, particularly with new unrefined implementations in things like quickfix, w basic network setup etc. Like... making a fix parser as fast as possible, will get you a couple us faster, but your network jitter alone is likely in the ms.... what was the purpose? If this is a latency play -- this won't fix anything. Been there, done that. |
And If you can please give me steps on how can I achieve a connection with any server using quickfix or fix API. Please mention some steps or material if it is possible. |
Again — this is not a quickfix issue forum.
Please direct any quickfix build issues to Quickfix. \
Just to cut to the chase, if running Quickfix is a struggle building your own replacement is going to be orders of magnitude more challenging.
I would likely revisit why this is of importance, and focus on your use cases -- plenty of ways to connect to a broker
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Umair Ahmad ***@***.***>
Sent: Monday, February 26, 2024 5:36:13 AM
To: da4089/simplefix ***@***.***>
Cc: Zach Mazz ***@***.***>; Mention ***@***.***>
Subject: Re: [da4089/simplefix] Add Socket connection? (#22)
And If you can please give me steps on how can I achieve a connection with any server using quickfix or fix API. Please mention some steps or material if it is possible.
—
Reply to this email directly, view it on GitHub<#22 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALPUCIAJ2TBDJN5WRHM2G4TYVRXS3AVCNFSM4JRBVJR2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGM4TGNZZHA3A>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@Umair-A it sounds like your best option would be to ask the QuickFIX folks for some help, probably a pointer to an example or tutorial. The steps involved in making a FIX connection include
In some of these steps, there are decisions to make about how you'd like to implement them. Network programming in Python has a number of possible approaches; message and session state persistence can also be done various ways. And if your ultimate goal is integration with MT5, that is itself a pretty large project (and completely unrelated to SimpleFIX). SimpleFIX would, at most, only be a very small part of all this. I'm happy to help you with that bit of the project, but the rest of it is your own responsibility. |
I've been thinking about adding a socket connection class to a generic FIX IP, was curious if there's anything in beta for this? If not, I'm happy to fork and contribute what I can to it if I have some success -- I was going to connect to IB.
Let me know your thoughts!
Simplefix is INCREDIBLE, so simple -- exactly what I was looking for -- FIX formatting without the overhead mess of QuickFix -- just needs a Socket initiator : )
Zach
The text was updated successfully, but these errors were encountered: