Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions _gen/generate-messages/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func genMessages() {

func genMessageImports() string {
fileOut := `
import(
import(
"github.com/quickfixgo/quickfix"
"github.com/quickfixgo/quickfix/enum"
`
Expand Down Expand Up @@ -247,7 +247,7 @@ func genMessageRoute(msg *datadictionary.MessageDef) string {
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string,string,quickfix.MessageRoute) {
r:=func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m:=new(Message)
Expand Down
16 changes: 8 additions & 8 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,35 @@ Creating your QuickFIX Application

Creating a FIX application is as easy as implementing the QuickFIX Application interface. By implementing these interface methods in your derived type, you are requesting to be notified of events that occur on the FIX engine. The function that you should be most aware of is fromApp.

Here are explanations of what these functions provide for you.
Here are explanations of what these callback functions provide for you.

OnCreate(sessionID SessionID)

This method is called when quickfix creates a new session. A session comes into and remains in existence for the life of the application. Sessions exist whether or not a counter party is connected to it. As soon as a session is created, you can begin sending messages to it. If no one is logged on, the messages will be sent at the time a connection is established with the counterparty.
OnCreate is called when quickfix creates a new session. A session comes into and remains in existence for the life of the application. Sessions exist whether or not a counter party is connected to it. As soon as a session is created, you can begin sending messages to it. If no one is logged on, the messages will be sent at the time a connection is established with the counterparty.

OnLogon(sessionID SessionID)

This callback notifies you when a valid logon has been established with a counter party. This is called when a connection has been established and the FIX logon process has completed with both parties exchanging valid logon messages.
OnLogon notifies you when a valid logon has been established with a counter party. This is called when a connection has been established and the FIX logon process has completed with both parties exchanging valid logon messages.

OnLogout(sessionID SessionID)

This callback notifies you when an FIX session is no longer online. This could happen during a normal logout exchange or because of a forced termination or a loss of network connection.
OnLogout notifies you when an FIX session is no longer online. This could happen during a normal logout exchange or because of a forced termination or a loss of network connection.

ToAdmin(message Message, sessionID SessionID)

This callback provides you with a peak at the administrative messages that are being sent from your FIX engine to the counter party. This is normally not useful for an application however it is provided for any logging you may wish to do. Notice that the Message is not const. This allows you to add fields before an adminstrative message before it is sent out.
ToAdmin provides you with a peak at the administrative messages that are being sent from your FIX engine to the counter party. This is normally not useful for an application however it is provided for any logging you may wish to do. Notice that the Message is not const. This allows you to add fields before an adminstrative message is sent out.

ToApp(message Message, sessionID SessionID) error

This is a callback for application messages that you are being sent to a counterparty. Notice that the Message is not const. This allows you to add fields before an application message before it is sent out.
ToApp notifies you of application messages that you are being sent to a counterparty. Notice that the Message is not const. This allows you to add fields before an application message before it is sent out.

FromAdmin(message Message, sessionID SessionID) MessageRejectError

This callback notifies you when an administrative message is sent from a counterparty to your FIX engine. This can be usefull for doing extra validation on logon messages such as for checking passwords.
FromAdmin notifies you when an administrative message is sent from a counterparty to your FIX engine. This can be usefull for doing extra validation on logon messages such as for checking passwords.

FromApp(msg Message, sessionID SessionID) MessageRejectError

This is one of the core entry points for your FIX application. Every application level request will come through here. If, for example, your application is a sell-side OMS, this is where you will get your new order requests. If you were a buy side, you would get your execution reports here.
FromApp is one of the core entry points for your FIX application. Every application level request will come through here. If, for example, your application is a sell-side OMS, this is where you will get your new order requests. If you were a buy side, you would get your execution reports here.

The sample code below shows how you might start up a FIX acceptor which listens on a socket. If you wanted an initiator, you would simply replace NewAcceptor in this code fragment with NewInitiator.

Expand Down
2 changes: 1 addition & 1 deletion fix40/advertisement/Advertisement.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/allocation/Allocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/allocationack/AllocationACK.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/dontknowtrade/DontKnowTrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/email/Email.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/executionreport/ExecutionReport.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/heartbeat/Heartbeat.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/indicationofinterest/IndicationofInterest.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/listcancelrequest/ListCancelRequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/listexecute/ListExecute.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/liststatus/ListStatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/liststatusrequest/ListStatusRequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/logon/Logon.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/logout/Logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/neworderlist/NewOrderList.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/newordersingle/NewOrderSingle.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/news/News.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/ordercancelreject/OrderCancelReject.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/ordercancelrequest/OrderCancelRequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/orderstatusrequest/OrderStatusRequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/quote/Quote.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
2 changes: 1 addition & 1 deletion fix40/quoterequest/QuoteRequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError

//Route returns the beginstring, message type, and MessageRoute for this Mesage type
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
Expand Down
Loading