Categorygithub.com/SilkageNet/quickfix
modulepackage
1.0.2
Repository: https://github.com/silkagenet/quickfix.git
Documentation: pkg.go.dev

# README

QuickFIX/Go

Build Status GoDoc Go Report Card

Open Source FIX Protocol library implemented in Go

Looking for help with MessageStore syntax changes?

See v0.9.0 release notes here

About

QuickFIX/Go is a FIX Protocol Community implementation for the Go programming language.

  • 100% free and open source with a liberal license
  • Supports FIX versions 4.0 - 5.0SP2
  • Runs on any hardware and operating system supported by Go (1.21+ required)
  • Spec driven run-time message validation
  • Spec driven code generation of type-safe FIX messages, fields, and repeating groups
  • Support for protocol customizations
  • Session state storage options: SQL, MongoDB, On-disk, or In-memory
  • Logging options: File, Screen
  • Failover and High Availability
  • Daily and weekly scheduling of session connections
  • Integrated support for SSL communicaitons
  • Automated unit and acceptance tests
  • Commercial Support available

Sponsored by Connamara

Installation

With Go module support, simply add the following import

import "github.com/SilkageNet/quickfix"

to your code, and then go [build|run|test] will automatically fetch the necessary dependencies.

Otherwise, run the following Go command to install the quickfix package:

go get -u github.com/SilkageNet/quickfix

Getting Started

FIX Messaging Model

To send and receive messages, your application will need a few additional packages.

QuickFIX/Go maintains separate packages for tags, fields, enums, messages, and message components auto-generated from the FIX 4.0 - FIX5.0SP2 XML specifications-

For most FIX applications, these generated resources are sufficient. Custom FIX applications may generate source specific to the FIX spec of that application using the generate-fix tool included with QuickFIX/Go.

Following installation, generate-fix is installed to $GOPATH/bin/generate-fix. Run $GOPATH/bin/generate-fix --help for usage instructions.

General Support

Github Discussions

Our Github Discussions Board is free, public, and easily searchable. It’s the preferred method of user support from the QuickFIX/Go team.

Please provide as much detail as you can when asking a question, and include relevant configurations and code snippets.

FIX Protocol

More information about the FIX protocol can be found at the FIX Protocol website.

Bugs and Issues

Bugs and issues can be submitted by anyone through our GitHub repository issues list.

Note: Please do not submit questions or help requests to the issues list. It is for bugs and issues. If you need help, please use the Discussions board as described above and you’ll be able to send your question to the entire community.

GitHub Issues

Please provide sample code, logs, and a description of the problem when the issue is submitted.

We will try to address new issues as quickly as possible, and we welcome contributions for bug fixes and new features!

Commercial Support

Connamara Systems offers commercial support for developers who are integrating any of the QuickFIX implementations (Go, C++, Java, .NET). The support is offered in 10-hour bundles and grants developers access, via telephone or email, to the team that created QuickFIX/Go, QuickFIX/n, and are maintainers of QuickFIX.

In addition to offering QuickFIX support, Connamara delivers Made-To-Measure Trading Solutions by bridging the gap between buy and build. By using internally developed trading platform components, Connamara delivers the best of off-the-shelf ISV solutions and custom application development. Coupled with Connamara’s unique licensing model, trading firms can get the best of both build and buy.

Contributing

If you wish to work on QuickFIX/Go itself, you will need Docker and VSCode on your machine.

  • Clone the repo and open it with VSCode with Docker running
  • This repo comes with vscode devcontainer configs in ./.devcontainer/
  • Click the pop-up to re-open the project in the Dev Container
  • This opens the project in a docker container pre-configured with everything you need

Build and Test

The default make target runs go vet and unit tests.

make

If this exits with exit status 0, then everything is working!

Generated Code

Generated code from the FIX40-FIX50SP2 specs are available as separate repos under the QuickFIX/Go organization. The source specifications for this generated code is located in spec/. Generated code can be identified by the .generated.go suffix. Any changes to generated code must be captured by changes to source in cmd/generate-fix. After making changes to the code generator source, run the following to re-generate the source

make generate

If you are making changes to the generated code, please create Pull Requests for these changes for the affected repos.

Acceptance Tests

QuickFIX/Go has a comprehensive acceptance test suite covering the FIX protocol. These are the same tests used across all QuickFIX implementations.

QuickFIX/Go acceptance tests depend on ruby in path, if you are using the dev container, it is already installed

To run acceptance tests,

# generate code locally
make generate

# build acceptance test rig
make build-test-srv

# run acceptance tests
make accept

Licensing

This software is available under the QuickFIX Software License. Please see the LICENSE.txt for the terms specified by the QuickFIX Software License.

# Packages

No description provided by the author
Package config declares settings for configuring QuickFIX/Go.
Package datadictionary provides support for parsing and organizing FIX Data Dictionaries.
No description provided by the author
No description provided by the author

# Functions

ConditionallyRequiredFieldMissing indicates that the requested field could not be found in the FIX message.
GetExpectedSenderNum retrieves the expected sender sequence number for the session matching the session id.
GetExpectedTargetNum retrieves the next target sequence number for the session matching the session id.
GetLog returns the Log interface for session matching the session id.
GetMessageStore returns the MessageStore interface for session matching the session id.
GroupElement returns a GroupItem made up of a single field.
IncorrectDataFormatForValue returns an error indicating a field that cannot be parsed as the type required.
InvalidMessageType returns an error to indicate an invalid message type.
InvalidTagNumber returns a validation error for messages with invalid tags.
NewAcceptor creates and initializes a new Acceptor.
NewBusinessMessageRejectError returns a MessageRejectError with the given error mesage, reject reason, and optional reftagid.
NewBusinessMessageRejectErrorWithRefID returns a MessageRejectError with the given error mesage, reject reason, refID, and optional reftagid.
NewInitiator creates and initializes a new Initiator.
NewMemoryStoreFactory returns a MessageStoreFactory instance that created in-memory MessageStores.
NewMessage returns a newly initialized Message instance.
NewMessageRejectError returns a MessageRejectError with the given error message, reject reason, and optional reftagid.
NewMessageRouter returns an initialized MessageRouter instance.
NewNullLogFactory creates an instance of LogFactory that returns no-op loggers.
NewRepeatingGroup returns an initilized RepeatingGroup instance.
NewSessionSettings returns a newly initialized SessionSettings instance.
NewSettings creates a Settings instance.
NewValidator creates a FIX message validator from the given data dictionaries.
ParseMessage constructs a Message from a byte slice wrapping a FIX message.
ParseMessageWithDataDictionary constructs a Message from a byte slice wrapping a FIX message using an optional session and application DataDictionary for reference.
ParseSettings creates and initializes a Settings instance with config parsed from a Reader.
RequiredTagMissing returns a validation error when a required field cannot be found in a message.
ResetSession resets session's sequence numbers.
Send determines the session to send Messagable using header fields BeginString, TargetCompID, SenderCompID.
SendToTarget sends a message based on the sessionID.
SetNextSenderMsgSeqNum sets the next outgoing message sequence number for the session matching the session id.
SetNextTargetMsgSeqNum set the next expected target message sequence number for the session matching the session id.
TagNotDefinedForThisMessageType returns an error for an invalid tag appearing in a message.
TagSpecifiedWithoutAValue returns a validation error for when a field has no value.
UnregisterSession removes a session from the set of known sessions.
UnsupportedMessageType returns an error to indicate an unhandled message.
ValueIsIncorrect returns an error indicating a field with value that is not valid.

# Constants

FIX ApplVerID string values.
FIX ApplVerID string values.
FIX ApplVerID string values.
FIX ApplVerID string values.
FIX ApplVerID string values.
FIX ApplVerID string values.
FIX ApplVerID string values.
FIX ApplVerID string values.
FIX ApplVerID string values.
FIX ApplVerID string values.
FIX BeginString string values.
FIX BeginString string values.
FIX BeginString string values.
FIX BeginString string values.
FIX BeginString string values.
FIX BeginString string values.
All TimestampPrecisions supported by FIX.
All TimestampPrecisions supported by FIX.
All TimestampPrecisions supported by FIX.
All TimestampPrecisions supported by FIX.
No description provided by the author

# Variables

ErrDoNotSend is a convenience error to indicate a DoNotSend in ToApp.

# Structs

Acceptor accepts connections from FIX clients and manages the associated sessions.
Body is the primary application section of a FIX message.
ConditionallyRequiredSetting indicates a missing setting.
FieldMap is a collection of fix fields that make up a fix message.
FIXDecimal is a FIX Float Value that implements an arbitrary precision fixed-point decimal.
FIXUTCTimestamp is a FIX UTC Timestamp value, implements FieldValue.
Group is a group of fields occurring in a repeating group.
Header is first section of a FIX Message.
IncorrectFormatForSetting indicates a setting that is incorrectly formatted.
Initiator initiates connections and processes messages for all sessions.
Message is a FIX Message abstraction.
A MessageRouter is a mutex for MessageRoutes.
RejectLogon indicates the application is rejecting permission to logon.
RepeatingGroup is a FIX Repeating Group type.
SessionID is a unique identifier of a Session.
SessionSettings maps session settings to values with typed accessors.
The Settings type represents a collection of global and session settings.
TagValue is a low-level FIX field abstraction.
Trailer is the last section of a FIX message.
ValidatorSettings describe validation behavior.

# Interfaces

Application interface should be implemented by FIX Applications.
ConnectionValidator is an interface allowing to implement a custom authentication logic.
Field is the interface implemented by all typed Fields in a Message.
FieldGroup is the interface implemented by all typed Groups in a Message.
FieldGroupReader is an interface for reading a FieldGroup.
FieldGroupWriter is an interface for writing a FieldGroup.
The FieldValue interface is used to write/extract typed field values to/from raw bytes.
FieldValueReader is an interface for reading field values.
FieldValueWriter is an interface for writing field values.
FieldWriter is an interface for a writing a field.
GroupItem interface is used to construct repeating group templates.
Log is a generic interface for logging FIX messages and events.
The LogFactory interface creates global and session specific Log instances.
Messagable is a Message or something that can be converted to a Message.
MessageRejectError is a type of error that can correlate to a message reject.
The MessageStore interface provides methods to record and retrieve messages for resend purposes.
The MessageStoreFactory interface is used by session to create a session specific message store.
Validator validates a FIX message.

# Type aliases

FIXBoolean is a FIX Boolean value, implements FieldValue.
FIXBytes is a generic FIX field value, implements FieldValue.
FIXFloat is a FIX Float Value, implements FieldValue.
FIXInt is a FIX Int Value, implements FieldValue.
FIXString is a FIX String Value, implements FieldValue.
GroupTemplate specifies the group item order for a RepeatingGroup.
A MessageRoute is a function that can process a fromApp/fromAdmin callback.
Tag is a typed int representing a FIX tag.
TimestampPrecision defines the precision used by FIXUTCTimestamp.