Skip to content

Commit 211bc77

Browse files
author
Chris Busbey
committed
config docs
1 parent e486bb9 commit 211bc77

File tree

3 files changed

+146
-3
lines changed

3 files changed

+146
-3
lines changed

config/configuration.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
//Package config declares application and session settings for QuickFIX/Go
21
package config
32

43
const (

config/doc.go

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
/*
2+
Package config declares application and session settings for QuickFIX/Go
3+
4+
BeginString
5+
6+
Version of FIX this session should use. Valid values:
7+
8+
FIXT.1.1
9+
FIX.4.4
10+
FIX.4.3
11+
FIX.4.2
12+
FIX.4.1
13+
FIX.4.0
14+
15+
SenderCompID
16+
17+
Your ID as associated with this FIX session. Value is case-sensitive alpha-numeric string.
18+
19+
TargetCompID
20+
21+
Counter parties ID as associated with this FIX session. Value is case-sensitive alpha-numeric string.
22+
23+
SessionQualifier
24+
25+
Additional qualifier to disambiguate otherwise identical sessions. Value is case-sensitive alpha-numeric string.
26+
27+
DefaultApplVerID
28+
29+
Required only for FIXT 1.1 (and newer). Ignored for earlier transport versions. Specifies the default application version ID for the session. This can either be the ApplVerID enum (see the ApplVerID field) or the BeginString for the default version. Valid Values:
30+
31+
FIX.5.0SP2
32+
FIX.5.0SP1
33+
FIX.5.0
34+
FIX.4.4
35+
FIX.4.3
36+
FIX.4.2
37+
FIX.4.1
38+
FIX.4.0
39+
9
40+
8
41+
7
42+
6
43+
5
44+
4
45+
3
46+
2
47+
48+
ResetOnLogon
49+
50+
Determines if sequence numbers should be reset when recieving a logon request. Acceptors only. Valid Values:
51+
Y
52+
N
53+
54+
Defaults to N.
55+
56+
Validation
57+
58+
The following settings are specific to message validation.
59+
60+
DataDictionary
61+
62+
XML definition file for validating incoming FIX messages. If no DataDictionary is supplied, only basic message validation will be done.
63+
64+
This setting should only be used with FIX transport versions older than FIXT.1.1. See TransportDataDictionary and AppDataDictionary for FIXT.1.1 settings. Value must be a valid XML data dictionary file. QuickFIX/Go comes with the following defaults in the spec directory
65+
66+
FIX44.xml
67+
FIX43.xml
68+
FIX42.xml
69+
FIX41.xml
70+
FIX40.xml
71+
72+
TransportDataDictionary
73+
74+
XML definition file for validating admin (transport) messages. This setting is only valid for FIXT.1.1 (or newer) sessions. See DataDictionary for older transport versions (FIX.4.0 - FIX.4.4) for additional information. Value must be a valid XML data dictionary file, QuickFIX/Go comes with the following defaults in the spec directory
75+
76+
FIXT1.1.xml
77+
78+
AppDataDictionary
79+
80+
XML definition file for validating application messages. This setting is only valid for FIXT.1.1 (or newer) sessions. See DataDictionary for older transport versions (FIX.4.0 - FIX.4.4) for additional information.
81+
82+
This setting supports the possibility of a custom application data dictionary for each session. This setting would only be used with FIXT 1.1 and new transport protocols. This setting can be used as a prefix to specify multiple application dictionaries for the FIXT transport. For example:
83+
84+
DefaultApplVerID=FIX.4.2
85+
# For default application version ID
86+
AppDataDictionary=FIX42.xml
87+
# For nondefault application version ID
88+
# Use BeginString suffix for app version
89+
AppDataDictionary.FIX.4.4=FIX44.xml
90+
91+
Value must be a valid XML data dictionary file. QuickFIX/Go comes with the following defaults in the spec directory
92+
93+
FIX50SP2.xml
94+
FIX50SP1.xml
95+
FIX50.xml
96+
FIX44.xml
97+
FIX43.xml
98+
FIX42.xml
99+
FIX41.xml
100+
FIX40.xml
101+
102+
HeartBtInt
103+
104+
Heartbeat interval in seconds. Only used for initiators. Value must be positive integer.
105+
106+
SocketConnectPort
107+
108+
Socket port for connecting to a session. Only used for initiators. Must be positive integer
109+
110+
SocketConnectHost
111+
112+
Host to connect to. Only used for initiators. Value must be valid IP address in the format of x.x.x.x or a domain name
113+
114+
SocketAcceptPort
115+
116+
Socket port for listening to incoming connections, Only used with for acceptors. Value must be positive integer, valid open socket port.
117+
118+
FileLogPath
119+
120+
Directory to store logs. Value must be valid directory for storing files, application must have write access.
121+
*/
122+
package config

doc.go

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Package quickfix is a full featured messaging engine for the FIX protocol. It i
33
44
Creating your QuickFIX Application
55
6-
Creating a FIX application is as easy as implementing the QuickFIX Application interface. By implementing these interface methods in your derived class, 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.
6+
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.
77
88
Here are explanations of what these functions provide for you.
99
@@ -49,7 +49,7 @@ The sample code below shows how you might start up a FIX acceptor which listens
4949
flag.Parse()
5050
fileName := flag.Arg(0)
5151
52-
//FooApplication is your class that implements the Application interface
52+
//FooApplication is your type that implements the Application interface
5353
var app FooApplication
5454
5555
cfg, _ := os.Open(fileName)
@@ -62,5 +62,27 @@ The sample code below shows how you might start up a FIX acceptor which listens
6262
//for condition == true { do something }
6363
acceptor.Stop()
6464
}
65+
66+
Configuring QuickFIX
67+
68+
A QuickFIXGo acceptor or initiator can maintain as many FIX sessions as you would like. A FIX session is identified by a group of settings defined within the configuration section for a session (or inherited from the default section). The identification settings are:
69+
70+
| Setting | Required? |
71+
|--------------|-----------|
72+
| BeginString | Y |
73+
| SenderCompID | Y |
74+
| SenderSubID | N |
75+
| TargetCompID | Y |
76+
| TargetSubID | N |
77+
78+
The sender settings are your identification and the target settings are for the counterparty. A SessionQualifier can also be use to disambiguate otherwise identical sessions.
79+
80+
Each of the sessions can have several settings associated with them. Some of these settings may not be known at compile time and are therefore passed around in a struct called SessionSettings.
81+
82+
SessionSettings can be read in from any input stream such as a file stream. If you decide to write your own components, (storage for a particular database, a new kind of connector etc...), you may also use the session settings to store settings for your custom component.
83+
84+
A settings file is set up with two types of heading, a [DEFAULT] and a [SESSION] heading. [SESSION] tells QuickFIX/Go that a new Session is being defined. [DEFAULT] is a place that you can define settings which will be inherited by sessions that don't explicitly define them. If you do not provide a setting that QuickFIX/Go needs, it will return an error indicating that a setting is missing or improperly formatted.
85+
86+
See the quickfix/config package for settings you can associate with a session based on the default components provided with QuickFIX/Go.
6587
*/
6688
package quickfix

0 commit comments

Comments
 (0)