Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HaltReason ¶
type HaltReason int64
HaltReason represents the reason for a trading halt. Its values are defined according to the corresponding Price field in the LOBSTER csv.
const ( HaltTrading HaltReason = -1 ResumeQuoting HaltReason = 0 ResumeTrading HaltReason = 1 )
type LOBSTERCancellation ¶
type LOBSTERCancellation struct { EventSinceMidnight time.Duration `json:"timesincemidnight"` OrderID uint64 `json:"orderid"` Size uint64 `json:"size"` Price uint64 `json:"price"` Direction int64 `json:"side"` }
LOBSTERCancellation is a struct that represents the Order Cancellation event type from the LOBSTER data set.
func (*LOBSTERCancellation) MarshalCsvLOBSTER ¶
func (lc *LOBSTERCancellation) MarshalCsvLOBSTER() (eventFields []string, err error)
MarshalLOBSTER marshals a LOBSTERCancellation into a set of strings that can be written using encoding/csv.
func (*LOBSTERCancellation) MarshalJSON ¶
func (lc *LOBSTERCancellation) MarshalJSON() (jsonBytes []byte, err error)
MarshalJSON implements the JSONMarshaler interface for this struct.
func (*LOBSTERCancellation) UnmarshalCsvLOBSTER ¶
func (lc *LOBSTERCancellation) UnmarshalCsvLOBSTER(eventFields []string) (err error)
UnmarshalCsvLOBSTER unmarshals a list of strings into a LOBSTERCancellation, given they are parsed from encoding/csv.
type LOBSTERCrossTrade ¶
type LOBSTERCrossTrade struct { EventSinceMidnight time.Duration `json:"timesincemidnight"` OrderID uint64 `json:"orderid"` Size uint64 `json:"size"` Price uint64 `json:"price"` Direction int64 `json:"side"` }
LOBSTERCrossTrade is a struct that represents the cross trade event type from the LOBSTER data set.
func (*LOBSTERCrossTrade) MarshalCsvLOBSTER ¶
func (lt *LOBSTERCrossTrade) MarshalCsvLOBSTER() (eventFields []string, err error)
MarshalLOBSTER marshals a LOBSTERCrossTrade into a set of strings that can be written using encoding/csv.
func (*LOBSTERCrossTrade) MarshalJSON ¶
func (lt *LOBSTERCrossTrade) MarshalJSON() (jsonBytes []byte, err error)
MarshalJSON implements the JSONMarshaler interface for this struct.
func (*LOBSTERCrossTrade) UnmarshalCsvLOBSTER ¶
func (lt *LOBSTERCrossTrade) UnmarshalCsvLOBSTER(eventFields []string) (err error)
UnmarshalCsvLOBSTER unmarshals a list of strings into a LOBSTERCrossTrade, given they are parsed from encoding/csv.
type LOBSTERData ¶
type LOBSTERData interface { // UnmarshalCsvLOBSTER should unmarshal data from a list of // strings, which are assumed to be received by the encoding/csv // output from parsing a LOBSTER dataset csv. UnmarshalCsvLOBSTER([]string) error // MarshalCsvLOBSTER should marshal data from a LOBSTERData, // outputting a list of strings that can be written to a csv file // by encoding/csv. MarshalCsvLOBSTER() ([]string, error) }
LOBSTERData is an interface for all types of LOBSTER Data, it specifies that LOBSTER Data should marshal and unmarshal from an output of a csv
type LOBSTERDeletion ¶
type LOBSTERDeletion struct { EventSinceMidnight time.Duration `json:"timesincemidnight"` OrderID uint64 `json:"orderid"` Size uint64 `json:"size"` Price uint64 `json:"price"` Direction int64 `json:"side"` }
LOBSTERDeletion is a struct that represents the Order Deletion event type from the LOBSTER data set.
func (*LOBSTERDeletion) MarshalCsvLOBSTER ¶
func (ld *LOBSTERDeletion) MarshalCsvLOBSTER() (eventFields []string, err error)
MarshalLOBSTER marshals a LOBSTERDeletion into a set of strings that can be written using encoding/csv.
func (*LOBSTERDeletion) MarshalJSON ¶
func (ld *LOBSTERDeletion) MarshalJSON() (jsonBytes []byte, err error)
MarshalJSON implements the JSONMarshaler interface for this struct.
func (*LOBSTERDeletion) UnmarshalCsvLOBSTER ¶
func (ld *LOBSTERDeletion) UnmarshalCsvLOBSTER(eventFields []string) (err error)
UnmarshalCsvLOBSTER unmarshals a list of strings into a LOBSTERDeletion, given they are parsed from encoding/csv.
type LOBSTERExecutionHidden ¶
type LOBSTERExecutionHidden struct { EventSinceMidnight time.Duration `json:"timesincemidnight"` Size uint64 `json:"size"` Price uint64 `json:"price"` Direction int64 `json:"side"` }
LOBSTERExecutionHidden is a struct that represents the hidden execution event type from the LOBSTER data set.
func (*LOBSTERExecutionHidden) MarshalCsvLOBSTER ¶
func (lh *LOBSTERExecutionHidden) MarshalCsvLOBSTER() (eventFields []string, err error)
MarshalLOBSTER marshals a LOBSTERExecutionHidden into a set of strings that can be written using encoding/csv.
func (*LOBSTERExecutionHidden) MarshalJSON ¶
func (lh *LOBSTERExecutionHidden) MarshalJSON() (jsonBytes []byte, err error)
MarshalJSON implements the JSONMarshaler interface for this struct.
func (*LOBSTERExecutionHidden) UnmarshalCsvLOBSTER ¶
func (lh *LOBSTERExecutionHidden) UnmarshalCsvLOBSTER(eventFields []string) (err error)
UnmarshalCsvLOBSTER unmarshals a list of strings into a LOBSTERExecutionHidden, given they are parsed from encoding/csv.
type LOBSTERExecutionVisible ¶
type LOBSTERExecutionVisible struct { EventSinceMidnight time.Duration `json:"timesincemidnight"` OrderID uint64 `json:"orderid"` Size uint64 `json:"size"` Price uint64 `json:"price"` Direction int64 `json:"side"` }
LOBSTERExecutionVisible is a struct that represents the visible execution event type from the LOBSTER data set.
func (*LOBSTERExecutionVisible) MarshalCsvLOBSTER ¶
func (lv *LOBSTERExecutionVisible) MarshalCsvLOBSTER() (eventFields []string, err error)
MarshalLOBSTER marshals a LOBSTERExecutionVisible into a set of strings that can be written using encoding/csv.
func (*LOBSTERExecutionVisible) MarshalJSON ¶
func (lv *LOBSTERExecutionVisible) MarshalJSON() (jsonBytes []byte, err error)
MarshalJSON implements the JSONMarshaler interface for this struct.
func (*LOBSTERExecutionVisible) UnmarshalCsvLOBSTER ¶
func (lv *LOBSTERExecutionVisible) UnmarshalCsvLOBSTER(eventFields []string) (err error)
UnmarshalCsvLOBSTER unmarshals a list of strings into a LOBSTERExecutionVisible, given they are parsed from encoding/csv.
type LOBSTERSubmission ¶
type LOBSTERSubmission struct { EventSinceMidnight time.Duration `json:"timesincemidnight"` OrderID uint64 `json:"orderid"` Size uint64 `json:"size"` Price uint64 `json:"price"` Direction int64 `json:"side"` }
LOBSTERSubmission is a struct that represents the Order Submission event type from the LOBSTER data set.
func (*LOBSTERSubmission) MarshalCsvLOBSTER ¶
func (ls *LOBSTERSubmission) MarshalCsvLOBSTER() (eventFields []string, err error)
MarshalLOBSTER marshals a LOBSTERSubmission into a set of strings that can be written using encoding/csv.
func (*LOBSTERSubmission) MarshalJSON ¶
func (ls *LOBSTERSubmission) MarshalJSON() (jsonBytes []byte, err error)
MarshalJSON implements the JSONMarshaler interface for this struct.
func (*LOBSTERSubmission) UnmarshalCsvLOBSTER ¶
func (ls *LOBSTERSubmission) UnmarshalCsvLOBSTER(eventFields []string) (err error)
UnmarshalCsvLOBSTER unmarshals a list of strings into a LOBSTERSubmission, given they are parsed from encoding/csv.
type LOBSTERTradingHalt ¶
type LOBSTERTradingHalt struct { EventSinceMidnight time.Duration `json:"timesincemidnight"` HaltType HaltReason `json:"halttype"` }
LOBSTERTradingHalt is a struct that represents the trading halt event type from the LOBSTER data set.
func (*LOBSTERTradingHalt) MarshalCsvLOBSTER ¶
func (lth *LOBSTERTradingHalt) MarshalCsvLOBSTER() (eventFields []string, err error)
MarshalLOBSTER marshals a LOBSTERTradingHalt into a set of strings that can be written using encoding/csv.
func (*LOBSTERTradingHalt) MarshalJSON ¶
func (lth *LOBSTERTradingHalt) MarshalJSON() (jsonBytes []byte, err error)
MarshalJSON implements the JSONMarshaler interface for this struct.
func (*LOBSTERTradingHalt) UnmarshalCsvLOBSTER ¶
func (lth *LOBSTERTradingHalt) UnmarshalCsvLOBSTER(eventFields []string) (err error)
UnmarshalCsvLOBSTER unmarshals a list of strings into a LOBSTERTradingHalt, given they are parsed from encoding/csv.