model

package
v0.0.0-...-d2b7790 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteMetadataByDate

func DeleteMetadataByDate(db *mongo.Client, source string, code, date string, timeout time.Duration) (int64, error)

func InsertMetadataMany

func InsertMetadataMany(db *mongo.Client, source string, metadata []*Metadata, timeout time.Duration) (int64, error)

Types

type Metadata

type Metadata struct {
	ObjectID        string  `json:"_id" bson:"_id"`
	Source          string  `json:"source" bson:"source"`
	Code            string  `json:"code" bson:"code"`
	Name            string  `json:"name" bson:"name"`                         // 0 股票简称
	Open            float64 `json:"open" bson:"open"`                         // 1 今日开盘价格
	YesterdayClosed float64 `json:"yesterday_closed" bson:"yesterday_closed"` // 2 昨日收盘价格
	Latest          float64 `json:"latest" bson:"latest"`                     // 3 最近成交价格
	High            float64 `json:"high" bson:"high"`                         // 4 最高成交价
	Low             float64 `json:"low" bson:"low"`                           // 5 最低成交价
	Volume          uint64  `json:"volume" bson:"volume"`                     // 8 成交数量(股)
	Account         float64 `json:"account" bson:"account"`                   // 9 成交金额(元)
	Date            string  `json:"date" bson:"date"`                         // 30 日期
	Time            string  `json:"time" bson:"time"`                         // 31 时间
	Suspend         string  `json:"suspend" bson:"suspend"`                   // 32 停牌状态
}

Metadata trade data

func SelectMetadataRange

func SelectMetadataRange(db *mongo.Client, offset, limit int64, source string, date string, lastID string, timeout time.Duration) ([]*Metadata, error)

func (*Metadata) String

func (m *Metadata) String() string

Jump to

Keyboard shortcuts

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