quickfix: github.com/quickfixgo/quickfix Index | Files | Directories

package quickfix

import "github.com/quickfixgo/quickfix"

Package quickfix is a full featured messaging engine for the FIX protocol. It is a 100% Go open source implementation of the popular C++ QuickFIX engine (http://quickfixengine.org).

User manual and additional information available at http://quickfixgo.org

Index

Package Files

acceptor.go application.go begin_string.go connection.go doc.go errors.go field.go field_map.go file_log.go filestore.go fileutil.go fix_boolean.go fix_bytes.go fix_decimal.go fix_float.go fix_int.go fix_string.go fix_utc_timestamp.go in_session.go initiator.go latent_state.go log.go logon_state.go logout_state.go message.go message_pool.go message_router.go mongostore.go msg_type.go not_session_time.go null_log.go parser.go pending_timeout.go registry.go repeating_group.go resend_state.go screen_log.go session.go session_factory.go session_id.go session_rejects.go session_settings.go session_state.go settings.go sqlstore.go store.go tag.go tag_value.go tls.go validation.go

Constants

const (
    BeginStringFIX40  = "FIX.4.0"
    BeginStringFIX41  = "FIX.4.1"
    BeginStringFIX42  = "FIX.4.2"
    BeginStringFIX43  = "FIX.4.3"
    BeginStringFIX44  = "FIX.4.4"
    BeginStringFIXT11 = "FIXT.1.1"
)

FIX BeginString string values

const (
    ApplVerIDFIX27    = "0"
    ApplVerIDFIX30    = "1"
    ApplVerIDFIX40    = "2"
    ApplVerIDFIX41    = "3"
    ApplVerIDFIX42    = "4"
    ApplVerIDFIX43    = "5"
    ApplVerIDFIX44    = "6"
    ApplVerIDFIX50    = "7"
    ApplVerIDFIX50SP1 = "8"
    ApplVerIDFIX50SP2 = "9"
)

FIX ApplVerID string values

Variables

var ErrDoNotSend = errors.New("Do Not Send")

ErrDoNotSend is a convenience error to indicate a DoNotSend in ToApp

func ParseMessage Uses

func ParseMessage(msg *Message, rawMessage *bytes.Buffer) (err error)

ParseMessage constructs a Message from a byte slice wrapping a FIX message.

func ParseMessageWithDataDictionary Uses

func ParseMessageWithDataDictionary(
    msg *Message,
    rawMessage *bytes.Buffer,
    transportDataDictionary *datadictionary.DataDictionary,
    applicationDataDictionary *datadictionary.DataDictionary,
) (err error)

ParseMessageWithDataDictionary constructs a Message from a byte slice wrapping a FIX message using an optional session and application DataDictionary for reference.

func Send Uses

func Send(m Messagable) (err error)

Send determines the session to send Messagable using header fields BeginString, TargetCompID, SenderCompID

func SendToTarget Uses

func SendToTarget(m Messagable, sessionID SessionID) error

SendToTarget sends a message based on the sessionID. Convenient for use in FromApp since it provides a session ID for incoming messages

func UnregisterSession Uses

func UnregisterSession(sessionID SessionID) error

UnregisterSession removes a session from the set of known sessions

type Acceptor Uses

type Acceptor struct {
    // contains filtered or unexported fields
}

Acceptor accepts connections from FIX clients and manages the associated sessions.

func NewAcceptor Uses

func NewAcceptor(app Application, storeFactory MessageStoreFactory, settings *Settings, logFactory LogFactory) (a *Acceptor, err error)

NewAcceptor creates and initializes a new Acceptor.

func (*Acceptor) Start Uses

func (a *Acceptor) Start() error

Start accepting connections.

func (*Acceptor) Stop Uses

func (a *Acceptor) Stop()

Stop logs out existing sessions, close their connections, and stop accepting new connections.

type Application Uses

type Application interface {
    //Notification of a session begin created.
    OnCreate(sessionID SessionID)

    //Notification of a session successfully logging on.
    OnLogon(sessionID SessionID)

    //Notification of a session logging off or disconnecting.
    OnLogout(sessionID SessionID)

    //Notification of admin message being sent to target.
    ToAdmin(message *Message, sessionID SessionID)

    //Notification of app message being sent to target.
    ToApp(message *Message, sessionID SessionID) error

    //Notification of admin message being received from target.
    FromAdmin(message *Message, sessionID SessionID) MessageRejectError

    //Notification of app message being received from target.
    FromApp(message *Message, sessionID SessionID) MessageRejectError
}

The Application interface should be implemented by FIX Applications. This is the primary interface for processing messages from a FIX Session.

type Body Uses

type Body struct{ FieldMap }

Body is the primary application section of a FIX message

func (*Body) Init Uses

func (b *Body) Init()

Init initializes the FIX message

func (Body) Len Uses

func (t Body) Len() int

func (Body) Less Uses

func (t Body) Less(i, j int) bool

func (Body) Swap Uses

func (t Body) Swap(i, j int)

type ConditionallyRequiredSetting Uses

type ConditionallyRequiredSetting struct {
    Setting string
}

ConditionallyRequiredSetting indicates a missing setting

func (ConditionallyRequiredSetting) Error Uses

func (e ConditionallyRequiredSetting) Error() string

type FIXBoolean Uses

type FIXBoolean bool

FIXBoolean is a FIX Boolean value, implements FieldValue.

func (FIXBoolean) Bool Uses

func (f FIXBoolean) Bool() bool

Bool converts the FIXBoolean value to bool

func (*FIXBoolean) Read Uses

func (f *FIXBoolean) Read(bytes []byte) error

func (FIXBoolean) Write Uses

func (f FIXBoolean) Write() []byte

type FIXBytes Uses

type FIXBytes []byte

FIXBytes is a generic FIX field value, implements FieldValue. Enables zero copy read from a FieldMap

func (*FIXBytes) Read Uses

func (f *FIXBytes) Read(bytes []byte) (err error)

func (FIXBytes) Write Uses

func (f FIXBytes) Write() []byte

type FIXDecimal Uses

type FIXDecimal struct {
    decimal.Decimal

    //Scale is the number of digits after the decimal point when Writing the field value as a FIX value
    Scale int32
}

FIXDecimal is a FIX Float Value that implements an arbitrary precision fixed-point decimal. Implements FieldValue

func (*FIXDecimal) Read Uses

func (d *FIXDecimal) Read(bytes []byte) (err error)

func (FIXDecimal) Write Uses

func (d FIXDecimal) Write() []byte

type FIXFloat Uses

type FIXFloat float64

FIXFloat is a FIX Float Value, implements FieldValue

func (FIXFloat) Float64 Uses

func (f FIXFloat) Float64() float64

Float64 converts the FIXFloat value to float64

func (*FIXFloat) Read Uses

func (f *FIXFloat) Read(bytes []byte) error

func (FIXFloat) Write Uses

func (f FIXFloat) Write() []byte

type FIXInt Uses

type FIXInt int

FIXInt is a FIX Int Value, implements FieldValue

func (FIXInt) Int Uses

func (f FIXInt) Int() int

Int converts the FIXInt value to int

func (*FIXInt) Read Uses

func (f *FIXInt) Read(bytes []byte) error

func (FIXInt) Write Uses

func (f FIXInt) Write() []byte

type FIXString Uses

type FIXString string

FIXString is a FIX String Value, implements FieldValue

func (*FIXString) Read Uses

func (f *FIXString) Read(bytes []byte) (err error)

func (FIXString) String Uses

func (f FIXString) String() string

func (FIXString) Write Uses

func (f FIXString) Write() []byte

type FIXUTCTimestamp Uses

type FIXUTCTimestamp struct {
    time.Time
    Precision TimestampPrecision
}

FIXUTCTimestamp is a FIX UTC Timestamp value, implements FieldValue

func (*FIXUTCTimestamp) Read Uses

func (f *FIXUTCTimestamp) Read(bytes []byte) (err error)

func (FIXUTCTimestamp) Write Uses

func (f FIXUTCTimestamp) Write() []byte

type Field Uses

type Field interface {
    FieldWriter
    FieldValueReader
}

Field is the interface implemented by all typed Fields in a Message

type FieldGroup Uses

type FieldGroup interface {
    Tag() Tag
    Write() []TagValue
    Read([]TagValue) ([]TagValue, error)
}

FieldGroup is the interface implemented by all typed Groups in a Message

type FieldGroupReader Uses

type FieldGroupReader interface {
    Tag() Tag
    Read([]TagValue) ([]TagValue, error)
}

FieldGroupReader is an interface for reading a FieldGroup

type FieldGroupWriter Uses

type FieldGroupWriter interface {
    Tag() Tag
    Write() []TagValue
}

FieldGroupWriter is an interface for writing a FieldGroup

type FieldMap Uses

type FieldMap struct {
    // contains filtered or unexported fields
}

FieldMap is a collection of fix fields that make up a fix message.

func (*FieldMap) Clear Uses

func (m *FieldMap) Clear()

Clear purges all fields from field map

func (FieldMap) Get Uses

func (m FieldMap) Get(parser Field) MessageRejectError

Get parses out a field in this FieldMap. Returned reject may indicate the field is not present, or the field value is invalid.

func (FieldMap) GetBool Uses

func (m FieldMap) GetBool(tag Tag) (bool, MessageRejectError)

GetBool is a GetField wrapper for bool fields

func (FieldMap) GetBytes Uses

func (m FieldMap) GetBytes(tag Tag) ([]byte, MessageRejectError)

GetBytes is a zero-copy GetField wrapper for []bytes fields

func (FieldMap) GetField Uses

func (m FieldMap) GetField(tag Tag, parser FieldValueReader) MessageRejectError

GetField parses of a field with Tag tag. Returned reject may indicate the field is not present, or the field value is invalid.

func (FieldMap) GetGroup Uses

func (m FieldMap) GetGroup(parser FieldGroupReader) MessageRejectError

GetGroup is a Get function specific to Group Fields.

func (FieldMap) GetInt Uses

func (m FieldMap) GetInt(tag Tag) (int, MessageRejectError)

GetInt is a GetField wrapper for int fields

func (FieldMap) GetString Uses

func (m FieldMap) GetString(tag Tag) (string, MessageRejectError)

GetString is a GetField wrapper for string fields

func (FieldMap) GetTime Uses

func (m FieldMap) GetTime(tag Tag) (t time.Time, err MessageRejectError)

GetTime is a GetField wrapper for utc timestamp fields

func (FieldMap) Has Uses

func (m FieldMap) Has(tag Tag) bool

Has returns true if the Tag is present in this FieldMap

func (FieldMap) Len Uses

func (t FieldMap) Len() int

func (FieldMap) Less Uses

func (t FieldMap) Less(i, j int) bool

func (*FieldMap) Set Uses

func (m *FieldMap) Set(field FieldWriter) *FieldMap

Set is a setter for fields

func (*FieldMap) SetBool Uses

func (m *FieldMap) SetBool(tag Tag, value bool) *FieldMap

SetBool is a SetField wrapper for bool fields

func (*FieldMap) SetBytes Uses

func (m *FieldMap) SetBytes(tag Tag, value []byte) *FieldMap

SetBytes sets bytes

func (*FieldMap) SetField Uses

func (m *FieldMap) SetField(tag Tag, field FieldValueWriter) *FieldMap

SetField sets the field with Tag tag

func (*FieldMap) SetGroup Uses

func (m *FieldMap) SetGroup(field FieldGroupWriter) *FieldMap

SetGroup is a setter specific to group fields

func (*FieldMap) SetInt Uses

func (m *FieldMap) SetInt(tag Tag, value int) *FieldMap

SetInt is a SetField wrapper for int fields

func (*FieldMap) SetString Uses

func (m *FieldMap) SetString(tag Tag, value string) *FieldMap

SetString is a SetField wrapper for string fields

func (FieldMap) Swap Uses

func (t FieldMap) Swap(i, j int)

func (FieldMap) Tags Uses

func (m FieldMap) Tags() []Tag

Tags returns all of the Field Tags in this FieldMap

type FieldValue Uses

type FieldValue interface {
    FieldValueWriter
    FieldValueReader
}

The FieldValue interface is used to write/extract typed field values to/from raw bytes

type FieldValueReader Uses

type FieldValueReader interface {
    //Reads the contents of the []byte into FieldValue.  Returns an error if there are issues in the data processing
    Read([]byte) error
}

FieldValueReader is an interface for reading field values

type FieldValueWriter Uses

type FieldValueWriter interface {
    //Writes out the contents of the FieldValue to a []byte
    Write() []byte
}

FieldValueWriter is an interface for writing field values

type FieldWriter Uses

type FieldWriter interface {
    Tag() Tag
    FieldValueWriter
}

FieldWriter is an interface for a writing a field

type Group Uses

type Group struct{ FieldMap }

Group is a group of fields occurring in a repeating group

func (Group) Len Uses

func (t Group) Len() int

func (Group) Less Uses

func (t Group) Less(i, j int) bool

func (Group) Swap Uses

func (t Group) Swap(i, j int)

type GroupItem Uses

type GroupItem interface {
    //Tag returns the tag identifying this GroupItem
    Tag() Tag

    //Parameter to Read is tagValues.  For most fields, only the first tagValue will be required.
    //The length of the slice extends from the tagValue mapped to the field to be read through the
    //following fields. This can be useful for GroupItems made up of repeating groups.
    //
    //The Read function returns the remaining tagValues not processed by the GroupItem. If there was a
    //problem reading the field, an error may be returned
    Read([]TagValue) ([]TagValue, error)

    //Clone makes a copy of this GroupItem
    Clone() GroupItem
}

GroupItem interface is used to construct repeating group templates

func GroupElement Uses

func GroupElement(tag Tag) GroupItem

GroupElement returns a GroupItem made up of a single field

type GroupTemplate Uses

type GroupTemplate []GroupItem

GroupTemplate specifies the group item order for a RepeatingGroup

func (GroupTemplate) Clone Uses

func (gt GroupTemplate) Clone() GroupTemplate

Clone makes a copy of this GroupTemplate

type Header struct{ FieldMap }

Header is first section of a FIX Message

func (*Header) Init Uses

func (h *Header) Init()

Init initializes the Header instance

func (Header) Len Uses

func (t Header) Len() int

func (Header) Less Uses

func (t Header) Less(i, j int) bool

func (Header) Swap Uses

func (t Header) Swap(i, j int)

type IncorrectFormatForSetting Uses

type IncorrectFormatForSetting struct {
    Setting, Value string
    Err            error
}

IncorrectFormatForSetting indicates a setting that is incorrectly formatted

func (IncorrectFormatForSetting) Error Uses

func (e IncorrectFormatForSetting) Error() string

type Initiator Uses

type Initiator struct {
    // contains filtered or unexported fields
}

Initiator initiates connections and processes messages for all sessions.

func NewInitiator Uses

func NewInitiator(app Application, storeFactory MessageStoreFactory, appSettings *Settings, logFactory LogFactory) (*Initiator, error)

NewInitiator creates and initializes a new Initiator.

func (*Initiator) Start Uses

func (i *Initiator) Start() (err error)

Start Initiator.

func (*Initiator) Stop Uses

func (i *Initiator) Stop()

Stop Initiator.

type Log Uses

type Log interface {
    //log incoming fix message
    OnIncoming([]byte)

    //log outgoing fix message
    OnOutgoing([]byte)

    //log fix event
    OnEvent(string)

    //log fix event according to format specifier
    OnEventf(string, ...interface{})
}

Log is a generic interface for logging FIX messages and events.

type LogFactory Uses

type LogFactory interface {
    //global log
    Create() (Log, error)

    //session specific log
    CreateSessionLog(sessionID SessionID) (Log, error)
}

The LogFactory interface creates global and session specific Log instances

func NewFileLogFactory Uses

func NewFileLogFactory(settings *Settings) (LogFactory, error)

NewFileLogFactory creates an instance of LogFactory that writes messages and events to file. The location of global and session log files is configured via FileLogPath.

func NewNullLogFactory Uses

func NewNullLogFactory() LogFactory

NewNullLogFactory creates an instance of LogFactory that returns no-op loggers.

func NewScreenLogFactory Uses

func NewScreenLogFactory() LogFactory

NewScreenLogFactory creates an instance of LogFactory that writes messages and events to stdout.

type Messagable Uses

type Messagable interface {
    ToMessage() *Message
}

Messagable is a Message or something that can be converted to a Message

type Message Uses

type Message struct {
    Header  Header
    Trailer Trailer
    Body    Body

    //ReceiveTime is the time that this message was read from the socket connection
    ReceiveTime time.Time
    // contains filtered or unexported fields
}

Message is a FIX Message abstraction.

func NewMessage Uses

func NewMessage() *Message

NewMessage returns a newly initialized Message instance

func (*Message) CopyInto Uses

func (m *Message) CopyInto(to *Message) error

CopyInto erases the dest messages and copies the curreny message content into it.

func (*Message) IsMsgTypeOf Uses

func (m *Message) IsMsgTypeOf(msgType string) bool

IsMsgTypeOf returns true if the Header contains MsgType (tag 35) field and its value is the specified one.

func (*Message) MsgType Uses

func (m *Message) MsgType() (string, MessageRejectError)

MsgType returns MsgType (tag 35) field's value

func (*Message) String Uses

func (m *Message) String() string

func (*Message) ToMessage Uses

func (m *Message) ToMessage() *Message

ToMessage returns the message itself

type MessageRejectError Uses

type MessageRejectError interface {
    error

    //RejectReason, tag 373 for session rejects, tag 380 for business rejects.
    RejectReason() int
    RefTagID() *Tag
    IsBusinessReject() bool
}

MessageRejectError is a type of error that can correlate to a message reject.

func ConditionallyRequiredFieldMissing Uses

func ConditionallyRequiredFieldMissing(tag Tag) MessageRejectError

ConditionallyRequiredFieldMissing indicates that the requested field could not be found in the FIX message.

func IncorrectDataFormatForValue Uses

func IncorrectDataFormatForValue(tag Tag) MessageRejectError

IncorrectDataFormatForValue returns an error indicating a field that cannot be parsed as the type required.

func InvalidMessageType Uses

func InvalidMessageType() MessageRejectError

InvalidMessageType returns an error to indicate an invalid message type

func InvalidTagNumber Uses

func InvalidTagNumber(tag Tag) MessageRejectError

InvalidTagNumber returns a validation error for messages with invalid tags.

func NewBusinessMessageRejectError Uses

func NewBusinessMessageRejectError(err string, rejectReason int, refTagID *Tag) MessageRejectError

NewBusinessMessageRejectError returns a MessageRejectError with the given error mesage, reject reason, and optional reftagid. Reject is treated as a business level reject

func NewMessageRejectError Uses

func NewMessageRejectError(err string, rejectReason int, refTagID *Tag) MessageRejectError

NewMessageRejectError returns a MessageRejectError with the given error message, reject reason, and optional reftagid

func RequiredTagMissing Uses

func RequiredTagMissing(tag Tag) MessageRejectError

RequiredTagMissing returns a validation error when a required field cannot be found in a message.

func TagNotDefinedForThisMessageType Uses

func TagNotDefinedForThisMessageType(tag Tag) MessageRejectError

TagNotDefinedForThisMessageType returns an error for an invalid tag appearing in a message.

func TagSpecifiedWithoutAValue Uses

func TagSpecifiedWithoutAValue(tag Tag) MessageRejectError

TagSpecifiedWithoutAValue returns a validation error for when a field has no value.

func UnsupportedMessageType Uses

func UnsupportedMessageType() MessageRejectError

UnsupportedMessageType returns an error to indicate an unhandled message.

func ValueIsIncorrect Uses

func ValueIsIncorrect(tag Tag) MessageRejectError

ValueIsIncorrect returns an error indicating a field with value that is not valid.

type MessageRoute Uses

type MessageRoute func(msg *Message, sessionID SessionID) MessageRejectError

A MessageRoute is a function that can process a fromApp/fromAdmin callback

type MessageRouter Uses

type MessageRouter struct {
    // contains filtered or unexported fields
}

A MessageRouter is a mutex for MessageRoutes

func NewMessageRouter Uses

func NewMessageRouter() *MessageRouter

NewMessageRouter returns an initialized MessageRouter instance

func (MessageRouter) AddRoute Uses

func (c MessageRouter) AddRoute(beginString string, msgType string, router MessageRoute)

AddRoute adds a route to the MessageRouter instance keyed to begin string and msgType.

func (MessageRouter) Route Uses

func (c MessageRouter) Route(msg *Message, sessionID SessionID) MessageRejectError

Route may be called from the fromApp/fromAdmin callbacks. Messages that cannot be routed will be rejected with UnsupportedMessageType.

type MessageStore Uses

type MessageStore interface {
    NextSenderMsgSeqNum() int
    NextTargetMsgSeqNum() int

    IncrNextSenderMsgSeqNum() error
    IncrNextTargetMsgSeqNum() error

    SetNextSenderMsgSeqNum(next int) error
    SetNextTargetMsgSeqNum(next int) error

    CreationTime() time.Time

    SaveMessage(seqNum int, msg []byte) error
    GetMessages(beginSeqNum, endSeqNum int) ([][]byte, error)

    Refresh() error
    Reset() error

    Close() error
}

The MessageStore interface provides methods to record and retrieve messages for resend purposes

type MessageStoreFactory Uses

type MessageStoreFactory interface {
    Create(sessionID SessionID) (MessageStore, error)
}

The MessageStoreFactory interface is used by session to create a session specific message store

func NewFileStoreFactory Uses

func NewFileStoreFactory(settings *Settings) MessageStoreFactory

NewFileStoreFactory returns a file-based implementation of MessageStoreFactory

func NewMemoryStoreFactory Uses

func NewMemoryStoreFactory() MessageStoreFactory

NewMemoryStoreFactory returns a MessageStoreFactory instance that created in-memory MessageStores

func NewMongoStoreFactory Uses

func NewMongoStoreFactory(settings *Settings) MessageStoreFactory

NewMongoStoreFactory returns a mongo-based implementation of MessageStoreFactory

func NewMongoStoreFactoryPrefixed Uses

func NewMongoStoreFactoryPrefixed(settings *Settings, collectionsPrefix string) MessageStoreFactory

NewMongoStoreFactoryPrefixed returns a mongo-based implementation of MessageStoreFactory, with prefix on collections

func NewSQLStoreFactory Uses

func NewSQLStoreFactory(settings *Settings) MessageStoreFactory

NewSQLStoreFactory returns a sql-based implementation of MessageStoreFactory

type RejectLogon Uses

type RejectLogon struct {
    Text string
}

RejectLogon indicates the application is rejecting permission to logon. Implements MessageRejectError

func (RejectLogon) Error Uses

func (e RejectLogon) Error() string

func (RejectLogon) IsBusinessReject Uses

func (RejectLogon) IsBusinessReject() bool

IsBusinessReject implements MessageRejectError

func (RejectLogon) RefTagID Uses

func (RejectLogon) RefTagID() *Tag

RefTagID implements MessageRejectError

func (RejectLogon) RejectReason Uses

func (RejectLogon) RejectReason() int

RejectReason implements MessageRejectError

type RepeatingGroup Uses

type RepeatingGroup struct {
    // contains filtered or unexported fields
}

RepeatingGroup is a FIX Repeating Group type

func NewRepeatingGroup Uses

func NewRepeatingGroup(tag Tag, template GroupTemplate) *RepeatingGroup

NewRepeatingGroup returns an initilized RepeatingGroup instance

func (*RepeatingGroup) Add Uses

func (f *RepeatingGroup) Add() *Group

Add appends a new group to the RepeatingGroup and returns the new Group

func (RepeatingGroup) Clone Uses

func (f RepeatingGroup) Clone() GroupItem

Clone makes a copy of this RepeatingGroup (tag, template)

func (RepeatingGroup) Get Uses

func (f RepeatingGroup) Get(i int) *Group

Get returns the ith group in this RepeatingGroup

func (RepeatingGroup) Len Uses

func (f RepeatingGroup) Len() int

Len returns the number of Groups in this RepeatingGroup

func (*RepeatingGroup) Read Uses

func (f *RepeatingGroup) Read(tv []TagValue) ([]TagValue, error)

func (RepeatingGroup) Tag Uses

func (f RepeatingGroup) Tag() Tag

Tag returns the Tag for this repeating Group

func (RepeatingGroup) Write Uses

func (f RepeatingGroup) Write() []TagValue

Write returns tagValues for all Items in the repeating group ordered by Group sequence and Group template order

type SessionID Uses

type SessionID struct {
    BeginString, TargetCompID, TargetSubID, TargetLocationID, SenderCompID, SenderSubID, SenderLocationID, Qualifier string
}

SessionID is a unique identifer of a Session

func (SessionID) IsFIXT Uses

func (s SessionID) IsFIXT() bool

IsFIXT returns true if the SessionID has a FIXT BeginString

func (SessionID) String Uses

func (s SessionID) String() string

type SessionSettings Uses

type SessionSettings struct {
    // contains filtered or unexported fields
}

SessionSettings maps session settings to values with typed accessors.

func NewSessionSettings Uses

func NewSessionSettings() *SessionSettings

NewSessionSettings returns a newly initialized SessionSettings instance

func (SessionSettings) BoolSetting Uses

func (s SessionSettings) BoolSetting(setting string) (bool, error)

BoolSetting returns the requested setting parsed as a boolean. Returns an errror if the setting is not set or cannot be parsed as a bool.

func (*SessionSettings) DurationSetting Uses

func (s *SessionSettings) DurationSetting(setting string) (val time.Duration, err error)

DurationSetting returns the requested setting parsed as a time.Duration. Returns an error if the setting is not set or cannot be parsed as a time.Duration.

func (*SessionSettings) HasSetting Uses

func (s *SessionSettings) HasSetting(setting string) bool

HasSetting returns true if a setting is set, false if not

func (*SessionSettings) Init Uses

func (s *SessionSettings) Init()

Init initializes or resets SessionSettings

func (*SessionSettings) IntSetting Uses

func (s *SessionSettings) IntSetting(setting string) (val int, err error)

IntSetting returns the requested setting parsed as an int. Returns an errror if the setting is not set or cannot be parsed as an int.

func (*SessionSettings) Set Uses

func (s *SessionSettings) Set(setting string, val string)

Set assigns a value to a setting on SessionSettings.

func (*SessionSettings) Setting Uses

func (s *SessionSettings) Setting(setting string) (string, error)

Setting is a settings string accessor. Returns an error if the setting is missing.

type Settings Uses

type Settings struct {
    // contains filtered or unexported fields
}

The Settings type represents a collection of global and session settings.

func NewSettings Uses

func NewSettings() *Settings

NewSettings creates a Settings instance

func ParseSettings Uses

func ParseSettings(reader io.Reader) (*Settings, error)

ParseSettings creates and initializes a Settings instance with config parsed from a Reader. Returns error if the config is has parse errors

func (*Settings) AddSession Uses

func (s *Settings) AddSession(sessionSettings *SessionSettings) (SessionID, error)

AddSession adds Session Settings to Settings instance. Returns an error if session settings with duplicate sessionID has already been added

func (*Settings) GlobalSettings Uses

func (s *Settings) GlobalSettings() *SessionSettings

GlobalSettings are default setting inherited by all session settings.

func (*Settings) Init Uses

func (s *Settings) Init()

Init initializes or resets a Settings instance

func (*Settings) SessionSettings Uses

func (s *Settings) SessionSettings() map[SessionID]*SessionSettings

SessionSettings return all session settings overlaying globalsettings.

type Tag Uses

type Tag int

Tag is a typed int representing a FIX tag

func (Tag) IsHeader Uses

func (t Tag) IsHeader() bool

IsHeader returns true if tag belongs in the message header

func (Tag) IsTrailer Uses

func (t Tag) IsTrailer() bool

IsTrailer returns true if tag belongs in the message trailer

type TagValue Uses

type TagValue struct {
    // contains filtered or unexported fields
}

TagValue is a low-level FIX field abstraction

func (TagValue) String Uses

func (tv TagValue) String() string

type TimestampPrecision Uses

type TimestampPrecision int

TimestampPrecision defines the precision used by FIXUTCTimestamp

const (
    Millis TimestampPrecision = iota
    Seconds
    Micros
    Nanos
)

All TimestampPrecisions supported by FIX

type Trailer Uses

type Trailer struct{ FieldMap }

Trailer is the last section of a FIX message

func (*Trailer) Init Uses

func (t *Trailer) Init()

Init initializes the FIX message

func (Trailer) Len Uses

func (t Trailer) Len() int

func (Trailer) Less Uses

func (t Trailer) Less(i, j int) bool

func (Trailer) Swap Uses

func (t Trailer) Swap(i, j int)

Directories

PathSynopsis
configPackage config declares application and session settings for QuickFIX/Go
datadictionaryPackage datadictionary provides support for parsing and organizing FIX Data Dictionaries
internal
_test

Package quickfix imports 27 packages (graph) and is imported by 2559 packages. Updated 2018-10-31. Refresh now. Tools for package owners.