tdxdatasource

package
v0.0.0-...-c68f7f2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const DAY = 24 * 60 * MINUTE
View Source
const MINUTE = 60 * 1000
View Source
const MINUTE_1130 = (11*60 + 30) * MINUTE
View Source
const MINUTE_1300 = 13 * 60 * MINUTE
View Source
const TDX_RECORD_SIZE = int(unsafe.Sizeof(TDXRecord{}))

Variables

This section is empty.

Functions

func DateToTimestamp

func DateToTimestamp(period Period, v uint32) uint64

func DayDateToTimestamp

func DayDateToTimestamp(v uint32) uint64

func MinuteDateToTimestamp

func MinuteDateToTimestamp(v uint32) uint64

func NewDataSource

func NewDataSource(dsDir string, needBuildCache bool) DataSource

func NewMarshaller

func NewMarshaller(period period.Period) datasource.RecordMarshaller

func SecurityToString

func SecurityToString(security *entity.Security) string

func TDXRecordFromBytes

func TDXRecordFromBytes(p period.Period, data []byte, r *TDXRecord) error

func TimestampToDate

func TimestampToDate(period Period, ts uint64) uint32

func TimestampToDayDate

func TimestampToDayDate(ts uint64) uint32

func TimestampToMinuteDate

func TimestampToMinuteDate(ts uint64) uint32

Types

type TDXRecord

type TDXRecord struct {
	Date   uint32
	Open   int32
	Close  int32
	High   int32
	Low    int32
	Volume float32
	Amount float32
	Pad    int32
}

func (*TDXRecord) Bytes

func (this *TDXRecord) Bytes(p period.Period) []byte

Jump to

Keyboard shortcuts

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