file

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParquetGroupNodeForDbnSchema

func ParquetGroupNodeForDbnSchema(dbnSchema dbn.Schema) *pqschema.GroupNode

ParquetSchemaForDbnSchema returns a GroupNode

func ParquetGroupNode_ImbalanceMsg

func ParquetGroupNode_ImbalanceMsg() *pqschema.GroupNode

ParquetGroupNode_ImbalanceMsg returns the Parquet Schema's Group Node for OhlcvMsg.

optional int64 field_id=-1 ts_event (Timestamp(isAdjustedToUTC=true, timeUnit=nanoseconds, is_from_converted_type=false, force_set_converted_type=false));
optional int32 field_id=-1 rtype (Int(bitWidth=8, isSigned=false));
optional int32 field_id=-1 publisher_id (Int(bitWidth=16, isSigned=false));
optional int32 field_id=-1 instrument_id (Int(bitWidth=32, isSigned=false));
optional double field_id=-1 ref_price;
optional int64 field_id=-1 auction_time (Int(bitWidth=64, isSigned=false));
optional double field_id=-1 cont_book_clr_price;
optional double field_id=-1 auct_interest_clr_price;
optional double field_id=-1 ssr_filling_price;
optional double field_id=-1 ind_match_price;
optional double field_id=-1 upper_collar;
optional double field_id=-1 lower_collar;
optional int32 field_id=-1 paired_qty (Int(bitWidth=32, isSigned=false));
optional int32 field_id=-1 total_imbalance_qty (Int(bitWidth=32, isSigned=false));
optional int32 field_id=-1 market_imbalance_qty (Int(bitWidth=32, isSigned=false));
optional int32 field_id=-1 unpaired_qty (Int(bitWidth=32, isSigned=false));
optional binary field_id=-1 auction_type (String);
optional binary field_id=-1 side (String);
optional int32 field_id=-1 auction_status (Int(bitWidth=8, isSigned=false));
optional int32 field_id=-1 freeze_status (Int(bitWidth=8, isSigned=false));
optional int32 field_id=-1 num_extensions (Int(bitWidth=8, isSigned=false));
optional binary field_id=-1 unpaired_side (String);
optional binary field_id=-1 significant_imbalance (String);
optional binary field_id=-1 symbol (String);
optional int64 field_id=-1 ts_recv (Timestamp(isAdjustedToUTC=true, timeUnit=nanoseconds, is_from_converted_type=false, force_set_converted_type=false));

func ParquetGroupNode_Mbp0Msg

func ParquetGroupNode_Mbp0Msg() *pqschema.GroupNode

ParquetGroupNode_Mbp0Msg returns the Parquet Schema's Group Node for OhlcvMsg.

optional int64 field_id=-1 ts_event (Timestamp(isAdjustedToUTC=true, timeUnit=nanoseconds, is_from_converted_type=false, force_set_converted_type=false));
optional int32 field_id=-1 rtype (Int(bitWidth=8, isSigned=false));
optional int32 field_id=-1 publisher_id (Int(bitWidth=16, isSigned=false));
optional int32 field_id=-1 instrument_id (Int(bitWidth=32, isSigned=false));
optional binary field_id=-1 action (String);
optional binary field_id=-1 side (String);
optional int32 field_id=-1 depth (Int(bitWidth=8, isSigned=false));
optional double field_id=-1 price;
optional int32 field_id=-1 size (Int(bitWidth=32, isSigned=false));
optional int32 field_id=-1 flags (Int(bitWidth=8, isSigned=false));
optional int32 field_id=-1 ts_in_delta;
optional int32 field_id=-1 sequence (Int(bitWidth=32, isSigned=false));
optional binary field_id=-1 symbol (String);
optional int64 field_id=-1 ts_recv (Timestamp(isAdjustedToUTC=true, timeUnit=nanoseconds, is_from_converted_type=false, force_set_converted_type=false));

func ParquetGroupNode_Mbp1Msg

func ParquetGroupNode_Mbp1Msg() *pqschema.GroupNode

ParquetGroupNode_Mbp1Msg returns the Parquet Schema's Group Node for OhlcvMsg.

optional int64 field_id=-1 ts_event (Timestamp(isAdjustedToUTC=true, timeUnit=nanoseconds, is_from_converted_type=false, force_set_converted_type=false)); optional int32 field_id=-1 rtype (Int(bitWidth=8, isSigned=false)); optional int32 field_id=-1 publisher_id (Int(bitWidth=16, isSigned=false)); optional int32 field_id=-1 instrument_id (Int(bitWidth=32, isSigned=false)); optional binary field_id=-1 action (String); optional binary field_id=-1 side (String); optional int32 field_id=-1 depth (Int(bitWidth=8, isSigned=false)); optional double field_id=-1 price; optional int32 field_id=-1 size (Int(bitWidth=32, isSigned=false)); optional int32 field_id=-1 flags (Int(bitWidth=8, isSigned=false)); optional int32 field_id=-1 ts_in_delta; optional int32 field_id=-1 sequence (Int(bitWidth=32, isSigned=false)); optional double field_id=-1 bid_px_00; optional double field_id=-1 ask_px_00; optional int32 field_id=-1 bid_sz_00 (Int(bitWidth=32, isSigned=false)); optional int32 field_id=-1 ask_sz_00 (Int(bitWidth=32, isSigned=false)); optional int32 field_id=-1 bid_ct_00 (Int(bitWidth=32, isSigned=false)); optional int32 field_id=-1 ask_ct_00 (Int(bitWidth=32, isSigned=false)); optional binary field_id=-1 symbol (String); optional int64 field_id=-1 ts_recv (Timestamp(isAdjustedToUTC=true, timeUnit=nanoseconds, is_from_converted_type=false, force_set_converted_type=false));

func ParquetGroupNode_OhlcvMsg

func ParquetGroupNode_OhlcvMsg() *pqschema.GroupNode

ParquetGroupNode_OhlcvMsg returns the Parquet Schema's Group Node for OhlcvMsg.

optional int32 field_id=-1 rtype (Int(bitWidth=8, isSigned=false)); optional int32 field_id=-1 publisher_id (Int(bitWidth=16, isSigned=false)); optional int32 field_id=-1 instrument_id (Int(bitWidth=32, isSigned=false)); optional double field_id=-1 open; optional double field_id=-1 high; optional double field_id=-1 low; optional double field_id=-1 close; optional int64 field_id=-1 volume (Int(bitWidth=64, isSigned=false)); optional binary field_id=-1 symbol (String); optional int64 field_id=-1 ts_event (Timestamp(isAdjustedToUTC=true, timeUnit=nanoseconds, is_from_converted_type=false, force_set_converted_type=false));

func ParquetWriteRow_ImbalanceMsg

func ParquetWriteRow_ImbalanceMsg(rgw pqfile.BufferedRowGroupWriter, record *dbn.ImbalanceMsg, dbnSymbolMap *dbn.TsSymbolMap) error

func ParquetWriteRow_Mbp0Msg

func ParquetWriteRow_Mbp0Msg(rgw pqfile.BufferedRowGroupWriter, record *dbn.Mbp0Msg, dbnSymbolMap *dbn.TsSymbolMap) error

func ParquetWriteRow_Mbp1Msg

func ParquetWriteRow_Mbp1Msg(rgw pqfile.BufferedRowGroupWriter, record *dbn.Mbp1Msg, dbnSymbolMap *dbn.TsSymbolMap) error

func ParquetWriteRow_OhlcvMsg

func ParquetWriteRow_OhlcvMsg(rgw pqfile.BufferedRowGroupWriter, record *dbn.OhlcvMsg, dbnSymbolMap *dbn.TsSymbolMap) error

func SplitFile

func SplitFile(sourceFilename string, destDir string, forceZstdInput bool, verbose bool) error

SplitFile splits a source file into "<feed>/<instrument_id>/Y/M/D/feed-YMD.type.dbn.zst"`

func WriteAsJson

func WriteAsJson[T any](val *T, writer io.Writer) error

WriteAsJson writes a value marshalled as JSON to the writer, returning any error.

func WriteDbnFileAsJson

func WriteDbnFileAsJson(sourceFile string, forceZstdInput bool, writer io.Writer) error

func WriteDbnFileAsParquet

func WriteDbnFileAsParquet(sourceFile string, forceZstdInput bool, destFile string) error

Types

type JsonWriterVisitor

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

JsonWriterVisitor is an implementation of all the dbn.Visitor interface. It marshals all the records as JSON anout outputs it to its Writer

func NewJsonWriterVisitor

func NewJsonWriterVisitor(writer io.Writer) *JsonWriterVisitor

NewJsonWriterVisitor creates a new JsonWriterVisitor with the given writer.

func (*JsonWriterVisitor) OnCmbp1

func (v *JsonWriterVisitor) OnCmbp1(record *dbn.Cmbp1Msg) error

func (*JsonWriterVisitor) OnErrorMsg

func (v *JsonWriterVisitor) OnErrorMsg(record *dbn.ErrorMsg) error

func (*JsonWriterVisitor) OnImbalance

func (v *JsonWriterVisitor) OnImbalance(record *dbn.ImbalanceMsg) error

func (*JsonWriterVisitor) OnInstrumentDefMsg

func (v *JsonWriterVisitor) OnInstrumentDefMsg(record *dbn.InstrumentDefMsg) error

func (*JsonWriterVisitor) OnMbo

func (v *JsonWriterVisitor) OnMbo(record *dbn.MboMsg) error

func (*JsonWriterVisitor) OnMbp0

func (v *JsonWriterVisitor) OnMbp0(record *dbn.Mbp0Msg) error

func (*JsonWriterVisitor) OnMbp1

func (v *JsonWriterVisitor) OnMbp1(record *dbn.Mbp1Msg) error

func (*JsonWriterVisitor) OnMbp10

func (v *JsonWriterVisitor) OnMbp10(record *dbn.Mbp10Msg) error

func (*JsonWriterVisitor) OnOhlcv

func (v *JsonWriterVisitor) OnOhlcv(record *dbn.OhlcvMsg) error

func (*JsonWriterVisitor) OnStatMsg

func (v *JsonWriterVisitor) OnStatMsg(record *dbn.StatMsg) error

func (*JsonWriterVisitor) OnStatusMsg

func (v *JsonWriterVisitor) OnStatusMsg(record *dbn.StatusMsg) error

func (*JsonWriterVisitor) OnStreamEnd

func (v *JsonWriterVisitor) OnStreamEnd() error

func (*JsonWriterVisitor) OnSymbolMappingMsg

func (v *JsonWriterVisitor) OnSymbolMappingMsg(record *dbn.SymbolMappingMsg) error

func (*JsonWriterVisitor) OnSystemMsg

func (v *JsonWriterVisitor) OnSystemMsg(record *dbn.SystemMsg) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL