Versions in this module Expand all Collapse all v0 v0.7.1 Jul 31, 2025 Changes in this version + const BboMsg_Size + const BidAskPair_Size + const Cmbp1Msg_Size + const ConsolidatedBidAskPair_Size + const DEFAULT_DECODE_BUFFER_SIZE + const DEFAULT_SCRATCH_BUFFER_SIZE + const ErrorMsg_ErrSize + const ErrorMsg_Size + const FIXED_PRICE_SCALE + const HeaderVersion1 + const HeaderVersion2 + const ImbalanceMsg_Size + const InstrumentDefMsg_Size + const MboMsg_Size + const Mbp0Msg_Size + const Mbp10Msg_Size + const Mbp1Msg_Size + const MetadataHeaderV1_Size + const MetadataHeaderV1_SizeFuzz + const MetadataHeaderV2_Size + const MetadataHeaderV2_SizeFuzz + const MetadataV1_ReservedLen + const MetadataV1_SymbolCstrLen + const MetadataV2_ReservedLen + const MetadataV2_SymbolCstrLen + const Metadata_DatasetCstrLen + const Metadata_PrefixSize + const OhlcvMsg_Size + const RFlag_BAD_TS_RECV + const RFlag_LAST + const RFlag_MAYBE_BAD_BOOK + const RFlag_MBP + const RFlag_SNAPSHOT + const RFlag_TOB + const RHeader_Size + const StatMsg_Size + const StatusMsg_Size + const SymbolMappingMsg_MinSize + const SystemMsg_MsgSize + const SystemMsg_Size + const UNDEF_TIMESTAMP + var ErrDateOutsideQueryRange = fmt.Errorf("date outside the query range") + var ErrHeaderTooLong = fmt.Errorf("header longer than expected") + var ErrHeaderTooShort = fmt.Errorf("header shorter than expected") + var ErrInvalidDBNFile = fmt.Errorf("invalid DBN file") + var ErrInvalidDBNVersion = fmt.Errorf("invalid DBN version") + var ErrMalformedRecord = fmt.Errorf("malformed record") + var ErrNoMetadata = fmt.Errorf("no metadata") + var ErrNoRecord = fmt.Errorf("no record scanned") + var ErrUnexpectedCStrLength = fmt.Errorf("unexpected cstr length") + var ErrUnknownRType = fmt.Errorf("unknown rtype") + var ErrWrongStypesForMapping = fmt.Errorf("wrong stypes for mapping") + func DatasetToHostname(dataset string) string + func DbnScannerDecode[R Record, RP RecordPtr[R]](s *DbnScanner) (*R, error) + func Fixed9ToFloat64(fixed int64) float64 + func JsonScannerDecode[R Record, RP RecordPtr[R]](s *JsonScanner) (*R, error) + func MakeCompressedReader(filename string, useZstd bool) (io.Reader, io.Closer, error) + func MakeCompressedWriter(filename string, useZstd bool) (io.Writer, func(), error) + func ReadJsonToSlice[R Record, RP RecordPtr[R]](reader io.Reader) ([]R, error) + func TimeToYMD(t time.Time) uint32 + func TimestampToSecNanos(dbnTimestamp uint64) (int64, int64) + func TimestampToTime(dbnTimestamp uint64) time.Time + func TrimNullBytes(b []byte) string + func YMDToTime(yyyymmdd int, loc *time.Location) time.Time + type Action uint8 + const Action_Add + const Action_Cancel + const Action_Clear + const Action_Fill + const Action_Modify + const Action_None + const Action_Trade + type BboMsg struct + Flags uint8 + Header RHeader + Level BidAskPair + Price int64 + Sequence uint32 + Side byte + Size uint32 + TsRecv uint64 + func (*BboMsg) RSize() uint16 + func (*BboMsg) RType() RType + func (r *BboMsg) Fill_Json(val *fastjson.Value, header *RHeader) error + func (r *BboMsg) Fill_Raw(b []byte) error + type BidAskPair struct + AskCt uint32 + AskPx int64 + AskSz uint32 + BidCt uint32 + BidPx int64 + BidSz uint32 + func (p *BidAskPair) Fill_Json(val *fastjson.Value) error + func (p *BidAskPair) Fill_Raw(b []byte) error + type Cmbp1Msg struct + Action byte + Flags uint8 + Header RHeader + Level ConsolidatedBidAskPair + Price int64 + Reserved byte + Sequence uint32 + Side byte + Size uint32 + TsInDelta int32 + TsRecv uint64 + func (*Cmbp1Msg) RSize() uint16 + func (*Cmbp1Msg) RType() RType + func (r *Cmbp1Msg) Fill_Json(val *fastjson.Value, header *RHeader) error + func (r *Cmbp1Msg) Fill_Raw(b []byte) error + type Compression uint8 + const Compress_None + const Compress_ZStd + func CompressionFromString(str string) (Compression, error) + func (*Compression) Type() string + func (c *Compression) Set(value string) error + func (c *Compression) UnmarshalJSON(data []byte) error + func (c Compression) MarshalJSON() ([]byte, error) + func (c Compression) String() string + type ConsolidatedBidAskPair struct + AskPb uint16 + AskPx int64 + AskSz uint32 + BidPb uint16 + BidPx int64 + BidSz uint32 + Reserved1 uint16 + Reserved2 uint16 + func (p *ConsolidatedBidAskPair) Fill_Json(val *fastjson.Value) error + func (p *ConsolidatedBidAskPair) Fill_Raw(b []byte) error + type DbnScanner struct + func NewDbnScanner(sourceReader io.Reader) *DbnScanner + func (s *DbnScanner) DecodeSymbolMappingMsg() (*SymbolMappingMsg, error) + func (s *DbnScanner) Error() error + func (s *DbnScanner) GetLastHeader() (RHeader, error) + func (s *DbnScanner) GetLastRecord() []byte + func (s *DbnScanner) GetLastSize() int + func (s *DbnScanner) Metadata() (*Metadata, error) + func (s *DbnScanner) Next() bool + func (s *DbnScanner) Visit(visitor Visitor) error + type Encoding uint8 + const Encoding_Csv + const Encoding_Dbn + const Encoding_Json + func EncodingFromString(str string) (Encoding, error) + func (*Encoding) Type() string + func (e *Encoding) Set(value string) error + func (e *Encoding) UnmarshalJSON(data []byte) error + func (e Encoding) MarshalJSON() ([]byte, error) + func (e Encoding) String() string + type ErrorMsg struct + Code uint8 + Error [ErrorMsg_ErrSize]byte + Header RHeader + IsLast uint8 + func (*ErrorMsg) RSize() uint16 + func (*ErrorMsg) RType() RType + func (r *ErrorMsg) Fill_Json(val *fastjson.Value, header *RHeader) error + func (r *ErrorMsg) Fill_Raw(b []byte) error + type ImbalanceMsg struct + AuctInterestClrPrice int64 + AuctionStatus uint8 + AuctionTime uint64 + AuctionType uint8 + ContBookClrPrice int64 + FreezeStatus uint8 + Header RHeader + IndMatchPrice int64 + LowerCollar int64 + MarketImbalanceQty uint32 + NumExtensions uint8 + PairedQty uint32 + RefPrice int64 + Reserved uint8 + Side uint8 + SignificantImbalance uint8 + SsrFillingPrice int64 + TotalImbalanceQty uint32 + TsRecv uint64 + UnpairedQty int32 + UnpairedSide uint8 + UpperCollar int64 + func (*ImbalanceMsg) RSize() uint16 + func (*ImbalanceMsg) RType() RType + func (r *ImbalanceMsg) Fill_Json(val *fastjson.Value, header *RHeader) error + func (r *ImbalanceMsg) Fill_Raw(b []byte) error + type InstrumentClass uint8 + const InstrumentClass_Bond + const InstrumentClass_Call + const InstrumentClass_CommoditySpot + const InstrumentClass_Future + const InstrumentClass_FutureSpread + const InstrumentClass_FxSpot + const InstrumentClass_MixedSpread + const InstrumentClass_OptionSpread + const InstrumentClass_Put + const InstrumentClass_Stock + func (i InstrumentClass) IsFuture() bool + func (i InstrumentClass) IsOption() bool + func (i InstrumentClass) IsSpread() bool + type InstrumentDefMsg struct + Activation uint64 + ApplID int16 + Asset [7]byte + Cfi [7]byte + ChannelID uint16 + ContractMultiplier int32 + ContractMultiplierUnit int8 + Currency [4]byte + DecayQuantity int32 + DecayStartDate uint16 + DisplayFactor int64 + Exchange [5]byte + Expiration uint64 + FlowScheduleType int8 + Group [21]byte + Header RHeader + HighLimitPrice int64 + InstAttribValue int32 + InstrumentClass byte + LowLimitPrice int64 + MainFraction uint8 + MarketDepth int32 + MarketDepthImplied int32 + MarketSegmentID uint32 + MatchAlgorithm byte + MaturityDay uint8 + MaturityMonth uint8 + MaturityWeek uint8 + MaturityYear uint16 + MaxPriceVariation int64 + MaxTradeVol uint32 + MdSecurityTradingStatus uint8 + MinLotSize int32 + MinLotSizeBlock int32 + MinLotSizeRoundLot int32 + MinPriceIncrement int64 + MinPriceIncrementAmount int64 + MinTradeVol uint32 + OriginalContractSize int32 + PriceDisplayFormat uint8 + PriceRatio int64 + RawInstrumentID uint32 + RawSymbol [MetadataV2_SymbolCstrLen]byte + Reserved [10]byte + Secsubtype [6]byte + SecurityType [7]byte + SecurityUpdateAction byte + SettlCurrency [4]byte + SettlPrice_type uint8 + StrikePrice int64 + StrikePriceCurrency [4]byte + SubFraction uint8 + TickRule uint8 + TradingReferenceDate uint16 + TradingReferencePrice int64 + TsRecv uint64 + Underlying [21]byte + UnderlyingID uint32 + UnderlyingProduct uint8 + UnitOfMeasure [31]byte + UnitOfMeasureQty int64 + UserDefinedInstrument UserDefinedInstrument + func (*InstrumentDefMsg) RSize() uint16 + func (*InstrumentDefMsg) RType() RType + func (r *InstrumentDefMsg) Fill_Json(val *fastjson.Value, header *RHeader) error + func (r *InstrumentDefMsg) Fill_Raw(b []byte) error + type JsonScanner struct + func NewJsonScanner(r io.Reader) *JsonScanner + func (s *JsonScanner) Error() error + func (s *JsonScanner) GetLastRecord() []byte + func (s *JsonScanner) GetLastSize() int + func (s *JsonScanner) Next() bool + func (s *JsonScanner) Visit(visitor Visitor) error + type MappingInterval struct + EndDate uint32 + StartDate uint32 + Symbol string + type MatchAlgorithm uint8 + const MatchAlgorithm_Configurable + const MatchAlgorithm_EurodollarFutures + const MatchAlgorithm_Fifo + const MatchAlgorithm_FifoLmm + const MatchAlgorithm_FifoTopLmm + const MatchAlgorithm_InstitutionalPrioritization + const MatchAlgorithm_ProRata + const MatchAlgorithm_ThresholdProRata + const MatchAlgorithm_ThresholdProRataLmm + const MatchAlgorithm_TimeProRata + type MboMsg struct + Action byte + ChannelID uint8 + Flags uint8 + Header RHeader + OrderID uint64 + Price int64 + Sequence uint32 + Side byte + Size uint32 + TsInDelta int32 + TsRecv uint64 + func (*MboMsg) RSize() uint16 + func (*MboMsg) RType() RType + func (r *MboMsg) Fill_Json(val *fastjson.Value, header *RHeader) error + func (r *MboMsg) Fill_Raw(b []byte) error + type Mbp0Msg struct + Action uint8 + Depth uint8 + Flags uint8 + Header RHeader + Price int64 + Sequence uint32 + Side uint8 + Size uint32 + TsInDelta int32 + TsRecv uint64 + func (*Mbp0Msg) RSize() uint16 + func (*Mbp0Msg) RType() RType + func (r *Mbp0Msg) Fill_Json(val *fastjson.Value, header *RHeader) error + func (r *Mbp0Msg) Fill_Raw(b []byte) error + type Mbp10Msg struct + Action byte + Depth uint8 + Flags uint8 + Header RHeader + Levels [10]BidAskPair + Price int64 + Sequence uint32 + Side byte + Size uint32 + TsInDelta int32 + TsRecv uint64 + func (*Mbp10Msg) RSize() uint16 + func (*Mbp10Msg) RType() RType + func (r *Mbp10Msg) Fill_Json(val *fastjson.Value, header *RHeader) error + func (r *Mbp10Msg) Fill_Raw(b []byte) error + type Mbp1Msg struct + Action byte + Depth uint8 + Flags uint8 + Header RHeader + Level BidAskPair + Price int64 + Sequence uint32 + Side byte + Size uint32 + TsInDelta int32 + TsRecv uint64 + func (*Mbp1Msg) RSize() uint16 + func (*Mbp1Msg) RType() RType + func (r *Mbp1Msg) Fill_Json(val *fastjson.Value, header *RHeader) error + func (r *Mbp1Msg) Fill_Raw(b []byte) error + type Metadata struct + Dataset string + End uint64 + Limit uint64 + Mappings []SymbolMapping + NotFound []string + Partial []string + Schema Schema + SchemaDefinition []byte + Start uint64 + StypeIn SType + StypeOut SType + SymbolCstrLen uint16 + Symbols []string + TsOut uint8 + VersionNum uint8 + func ReadDBNToSlice[R Record, RP RecordPtr[R]](reader io.Reader) ([]R, *Metadata, error) + func ReadMetadata(r io.Reader) (*Metadata, error) + func (m *Metadata) IsInverseMapping() (bool, error) + func (m *Metadata) Write(writer io.Writer) error + type MetadataHeaderV1 struct + DatasetRaw [Metadata_DatasetCstrLen]byte + End uint64 + Limit uint64 + Reserved [MetadataV1_ReservedLen]byte + ReservedX [8]byte + Schema Schema + Start uint64 + StypeIn SType + StypeOut SType + TsOut uint8 + func (m1 *MetadataHeaderV1) FillFixed_Raw(b []byte) error + type MetadataHeaderV2 struct + DatasetRaw [Metadata_DatasetCstrLen]byte + End uint64 + Limit uint64 + Reserved [MetadataV2_ReservedLen]byte + Schema Schema + Start uint64 + StypeIn SType + StypeOut SType + SymbolCstrLen uint16 + TsOut uint8 + func (m2 *MetadataHeaderV2) FillFixed_Raw(b []byte) error + type MetadataPrefix struct + Length uint32 + VersionRaw [4]byte + type NullVisitor struct + func (v *NullVisitor) OnBbo(record *BboMsg) error + func (v *NullVisitor) OnCmbp1(record *Cmbp1Msg) error + func (v *NullVisitor) OnErrorMsg(record *ErrorMsg) error + func (v *NullVisitor) OnImbalance(record *ImbalanceMsg) error + func (v *NullVisitor) OnInstrumentDefMsg(record *InstrumentDefMsg) error + func (v *NullVisitor) OnMbo(record *MboMsg) error + func (v *NullVisitor) OnMbp0(record *Mbp0Msg) error + func (v *NullVisitor) OnMbp1(record *Mbp1Msg) error + func (v *NullVisitor) OnMbp10(record *Mbp10Msg) error + func (v *NullVisitor) OnOhlcv(record *OhlcvMsg) error + func (v *NullVisitor) OnStatMsg(record *StatMsg) error + func (v *NullVisitor) OnStatusMsg(record *StatusMsg) error + func (v *NullVisitor) OnStreamEnd() error + func (v *NullVisitor) OnSymbolMappingMsg(record *SymbolMappingMsg) error + func (v *NullVisitor) OnSystemMsg(record *SystemMsg) error + type OhlcvMsg struct + Close int64 + Header RHeader + High int64 + Low int64 + Open int64 + Volume uint64 + func (*OhlcvMsg) RSize() uint16 + func (*OhlcvMsg) RType() RType + func (r *OhlcvMsg) Fill_Json(val *fastjson.Value, header *RHeader) error + func (r *OhlcvMsg) Fill_Raw(b []byte) error + type PitSymbolMap struct + func NewPitSymbolMap() *PitSymbolMap + func (p *PitSymbolMap) FillFromMetadata(metadata *Metadata, timestamp uint64) error + func (p *PitSymbolMap) Get(instrumentID uint32) string + func (p *PitSymbolMap) IsEmpty() bool + func (p *PitSymbolMap) Len() int + func (p *PitSymbolMap) OnSymbolMappingMsg(symbolMapping *SymbolMappingMsg) error + type RHeader struct + InstrumentID uint32 + Length uint8 + PublisherID uint16 + RType RType + TsEvent uint64 + func (h *RHeader) Fill_Json(val *fastjson.Value) error + func (h *RHeader) Fill_Raw(b []byte) error + func (h *RHeader) RSize() uint16 + type RType uint8 + const RType_Bbo1M + const RType_Bbo1S + const RType_Cbbo1M + const RType_Cbbo1S + const RType_Cmbp1 + const RType_Error + const RType_Imbalance + const RType_InstrumentDef + const RType_Mbo + const RType_Mbp0 + const RType_Mbp1 + const RType_Mbp10 + const RType_Ohlcv1D + const RType_Ohlcv1H + const RType_Ohlcv1M + const RType_Ohlcv1S + const RType_OhlcvDeprecated + const RType_OhlcvEod + const RType_Statistics + const RType_Status + const RType_SymbolMapping + const RType_System + const RType_Tcbbo + const RType_Unknown + func (rtype RType) IsBbo() bool + func (rtype RType) IsCandle() bool + func (rtype RType) IsCompatibleWith(rtype2 RType) bool + func (s RType) String() string + type Record interface + type RecordPtr interface + Fill_Json func(val *fastjson.Value, header *RHeader) error + Fill_Raw func([]byte) error + RSize func() uint16 + RType func() RType + type SType uint8 + const SType_BbgCompId + const SType_BbgCompTicker + const SType_CmsSymbol + const SType_Continuous + const SType_Figi + const SType_FigiTicker + const SType_InstrumentId + const SType_Isin + const SType_NasdaqSymbol + const SType_Parent + const SType_RawSymbol + const SType_Smart + const SType_UsCode + func STypeFromString(str string) (SType, error) + func (*SType) Type() string + func (s *SType) Set(value string) error + func (s *SType) UnmarshalJSON(data []byte) error + func (s SType) MarshalJSON() ([]byte, error) + func (s SType) String() string + type Schema uint16 + const Schema_Bbo1M + const Schema_Bbo1S + const Schema_Cbbo1M + const Schema_Cbbo1S + const Schema_Cmbp1 + const Schema_Definition + const Schema_Imbalance + const Schema_Mbo + const Schema_Mbp1 + const Schema_Mbp10 + const Schema_Mixed + const Schema_Ohlcv1D + const Schema_Ohlcv1H + const Schema_Ohlcv1M + const Schema_Ohlcv1S + const Schema_OhlcvEod + const Schema_Statistics + const Schema_Status + const Schema_Tbbo + const Schema_Tcbbo + const Schema_Trades + func SchemaFromString(str string) (Schema, error) + func (s *Schema) UnmarshalJSON(data []byte) error + func (s Schema) MarshalJSON() ([]byte, error) + func (s Schema) String() string + type SecurityUpdateAction uint8 + const Add + const Delete + const Invalid + const Modify + type Side uint8 + const Side_Ask + const Side_Bid + const Side_None + type StatMsg struct + ChannelID uint16 + Header RHeader + Price int64 + Quantity int32 + Reserved [6]uint8 + Sequence uint32 + StatFlags uint8 + StatType uint16 + TsInDelta int32 + TsRecv uint64 + TsRef uint64 + UpdateAction uint8 + func (*StatMsg) RSize() uint16 + func (*StatMsg) RType() RType + func (r *StatMsg) Fill_Json(val *fastjson.Value, header *RHeader) error + func (r *StatMsg) Fill_Raw(b []byte) error + type StatType uint8 + const StatType_ClearedVolume + const StatType_ClosePrice + const StatType_Delta + const StatType_FixingPrice + const StatType_HighestBid + const StatType_IndicativeOpeningPrice + const StatType_LowestOffer + const StatType_NetChange + const StatType_OpenInterest + const StatType_OpeningPrice + const StatType_SettlementPrice + const StatType_TradingSessionHighPrice + const StatType_TradingSessionLowPrice + const StatType_UncrossingPrice + const StatType_Volatility + const StatType_Vwap + type StatUpdateAction uint8 + const StatUpdateAction_Delete + const StatUpdateAction_New + type StatusAction uint8 + const StatusAction_Close + const StatusAction_Cross + const StatusAction_Halt + const StatusAction_NewPriceIndication + const StatusAction_None + const StatusAction_NotAvailableForTrading + const StatusAction_Pause + const StatusAction_PostClose + const StatusAction_PreClose + const StatusAction_PreCross + const StatusAction_PreOpen + const StatusAction_Quoting + const StatusAction_Rotation + const StatusAction_SsrChange + const StatusAction_Suspend + const StatusAction_Trading + const StatusReason_AdditionalInformationRequested + const StatusReason_Administrative + const StatusReason_CorporateAction + const StatusReason_Etf + const StatusReason_FilingReqsSatisfied + const StatusReason_FilingsNotCurrent + const StatusReason_InstrumentActivation + const StatusReason_InstrumentExpiration + const StatusReason_IssueAvailable + const StatusReason_IssuesReviewed + const StatusReason_LuldPause + const StatusReason_MarketEvent + const StatusReason_MarketWideHaltCarryover + const StatusReason_MarketWideHaltLevel1 + const StatusReason_MarketWideHaltLevel2 + const StatusReason_MarketWideHaltLevel3 + const StatusReason_MarketWideHaltResumption + const StatusReason_MergerEffective + const StatusReason_NewIssue + const StatusReason_NewSecurityOffering + const StatusReason_NewsAndResumptionTimes + const StatusReason_NewsNotForthcoming + const StatusReason_NewsPending + const StatusReason_NewsReleased + const StatusReason_NonCompliance + const StatusReason_None + const StatusReason_Operational + const StatusReason_OrderImbalance + const StatusReason_QuotationNotAvailable + const StatusReason_RecoveryInProcess + const StatusReason_Regulatory + const StatusReason_Scheduled + const StatusReason_SecTradingSuspension + const StatusReason_SurveillanceIntervention + type StatusMsg struct + Action uint16 + Header RHeader + IsQuoting uint8 + IsShortSellRestricted uint8 + IsTrading uint8 + Reason uint16 + Reserved [7]uint8 + TradingEvent uint16 + TsRecv uint64 + func (*StatusMsg) RSize() uint16 + func (*StatusMsg) RType() RType + func (r *StatusMsg) Fill_Json(val *fastjson.Value, header *RHeader) error + func (r *StatusMsg) Fill_Raw(b []byte) error + type StatusReason uint8 + type SymbolMapping struct + Intervals []MappingInterval + RawSymbol string + type SymbolMappingMsg struct + EndTs uint64 + Header RHeader + StartTs uint64 + StypeIn SType + StypeInSymbol string + StypeOut SType + StypeOutSymbol string + func (*SymbolMappingMsg) RSize(cstrLength uint16) uint16 + func (*SymbolMappingMsg) RType() RType + func (r *SymbolMappingMsg) Fill_Json(val *fastjson.Value, header *RHeader) error + func (r *SymbolMappingMsg) Fill_Raw(b []byte, cstrLength uint16) error + type SystemMsg struct + Code uint8 + Header RHeader + Message [SystemMsg_MsgSize]byte + func (*SystemMsg) RSize() uint16 + func (*SystemMsg) RType() RType + func (r *SystemMsg) Fill_Json(val *fastjson.Value, header *RHeader) error + func (r *SystemMsg) Fill_Raw(b []byte) error + type TradingEvent uint8 + const TradingEvent_ChangeTradingSession + const TradingEvent_ImpliedMatchingOff + const TradingEvent_ImpliedMatchingOn + const TradingEvent_NoCancel + const TradingEvent_None + const TriState_No + const TriState_NotAvailable + const TriState_Yes + type TriState uint8 + type TsSymbolMap struct + func NewTsSymbolMap() *TsSymbolMap + func (tsm *TsSymbolMap) FillFromMetadata(metadata *Metadata) error + func (tsm *TsSymbolMap) Get(dt time.Time, instrID uint32) string + func (tsm *TsSymbolMap) Insert(instrID uint32, startDate uint32, endDate uint32, ticker string) error + func (tsm *TsSymbolMap) IsEmpty() bool + func (tsm *TsSymbolMap) Len() int + type UserDefinedInstrument uint8 + const UserDefinedInstrument_No + const UserDefinedInstrument_Yes + type VersionUpgradePolicy uint8 + const VersionUpgradePolicy_AsIs + const VersionUpgradePolicy_Upgrade + type Visitor interface + OnBbo func(record *BboMsg) error + OnCmbp1 func(record *Cmbp1Msg) error + OnErrorMsg func(record *ErrorMsg) error + OnImbalance func(record *ImbalanceMsg) error + OnInstrumentDefMsg func(record *InstrumentDefMsg) error + OnMbo func(record *MboMsg) error + OnMbp0 func(record *Mbp0Msg) error + OnMbp1 func(record *Mbp1Msg) error + OnMbp10 func(record *Mbp10Msg) error + OnOhlcv func(record *OhlcvMsg) error + OnStatMsg func(record *StatMsg) error + OnStatusMsg func(record *StatusMsg) error + OnStreamEnd func() error + OnSymbolMappingMsg func(record *SymbolMappingMsg) error + OnSystemMsg func(record *SystemMsg) error