-
Couldn't load subscription status.
- Fork 0
add FIX over WS example for order entry and drop copy #11
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
base: develop
Are you sure you want to change the base?
Conversation
- wss://api.wss.dev.power.trade/v1/fix_order_entry - wss://api.wss.dev.power.trade/v1/fix_drop_copy using forked version of quickfix with websocket support added
|
|
||
| go 1.22 | ||
|
|
||
| replace github.com/quickfixgo/quickfix => github.com/Power-Trade/quickfix v0.9.6-powertrade.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use upstream quickfix but customise only some classes (e.g. Initiator)?
Experience with custom Initiator/Acceptor may be useful, because we want multiple connections (with same Sender&Target) and the easiest way to support it is to mark different connections' sessions with different SessionID.Qualifier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use upstream quickfix but customise only some classes (e.g. Initiator)?
Um.. don't think we can limit the changes to only Initiator/Acceptor. This is the changes I've made in quickfix.
The Dailer interface changes must be added given the current structure.
Experience with custom Initiator/Acceptor may be useful, because we want multiple connections (with same Sender&Target) and the easiest way to support it is to mark different connections' sessions with different SessionID.Qualifier.
Agree it would be good to gain the experience, but I think this can be treated as a separate problem to tackle.
| DataDictionary=spec/FIX44-PT.xml | ||
| SocketUseSSL=Y | ||
| WebsocketLocation=wss://api.wss.test.power.trade/v1/fix_drop_copy | ||
| WebsocketOrigin=http://localhost/ No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need WebsocketOrigin (I ignore HTTP headers on server side)? If yes, what about optional generic WebsocketHTTPHeaders?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems is a required field (golang.org/x/net/websocket) to start websocket connection. As a client library (quickfix), it's better to piggyback expose control over it to the user.
If yes, what about optional generic WebsocketHTTPHeaders?
yea, indeed we should expose those optional field as well, to allow user to have complete control over the ws connection
| ResetOnLogon=Y | ||
| DataDictionary=spec/FIX44-PT.xml | ||
| SocketUseSSL=Y | ||
| WebsocketLocation=wss://api.wss.test.power.trade/v1/fix_drop_copy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a duplication of api.wss.test.power.trade in SocketConnectHost and WebsocketLocation.
Let's either use only WebsocketLocation (remove SenderConnection*) or use SocketConnectionHost (i.e. if it has schema ws/wss, use WebSocket initiator)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a duplication of api.wss.test.power.trade in SocketConnectHost and WebsocketLocation.
this can be fixed in quickfix layer indeed. I have to keep SocketConnectHost there because they are mandatory fields, but it should be optional if WebsocketLocation is provided.
(remove SenderConnection*)
sorry, not sure what you mean here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated quickfix to allow SocketConnectHost to be optional
| switch *loggerCmd { | ||
| case "file": | ||
| logFactory = NewBeautyLogFactory(quickfix.NewScreenLogFactory()) | ||
| logFactory = NewBeautyLogFactory(screenlog.NewLogFactory()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is due to upstream refactoring, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@egor-pt are we determined to contribute back to quickfix ? then this example can eventually point back to upstream.
|
|
||
| go 1.22 | ||
|
|
||
| replace github.com/quickfixgo/quickfix => github.com/Power-Trade/quickfix v0.9.6-powertrade.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use upstream quickfix but customise only some classes (e.g. Initiator)?
Um.. don't think we can limit the changes to only Initiator/Acceptor. This is the changes I've made in quickfix.
The Dailer interface changes must be added given the current structure.
Experience with custom Initiator/Acceptor may be useful, because we want multiple connections (with same Sender&Target) and the easiest way to support it is to mark different connections' sessions with different SessionID.Qualifier.
Agree it would be good to gain the experience, but I think this can be treated as a separate problem to tackle.
| ResetOnLogon=Y | ||
| DataDictionary=spec/FIX44-PT.xml | ||
| SocketUseSSL=Y | ||
| WebsocketLocation=wss://api.wss.test.power.trade/v1/fix_drop_copy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a duplication of api.wss.test.power.trade in SocketConnectHost and WebsocketLocation.
this can be fixed in quickfix layer indeed. I have to keep SocketConnectHost there because they are mandatory fields, but it should be optional if WebsocketLocation is provided.
(remove SenderConnection*)
sorry, not sure what you mean here?
| DataDictionary=spec/FIX44-PT.xml | ||
| SocketUseSSL=Y | ||
| WebsocketLocation=wss://api.wss.test.power.trade/v1/fix_drop_copy | ||
| WebsocketOrigin=http://localhost/ No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems is a required field (golang.org/x/net/websocket) to start websocket connection. As a client library (quickfix), it's better to piggyback expose control over it to the user.
If yes, what about optional generic WebsocketHTTPHeaders?
yea, indeed we should expose those optional field as well, to allow user to have complete control over the ws connection
Issue: https://github.com/Power-Trade/cplx-ops/issues/156
using forked version of quickfix with websocket support added