model

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Kline

type Kline struct {
	KlineType KlineType
	StartTime int64           //周期的开始时间
	EndTime   int64           //周期的结束时间
	Amount    decimal.Decimal //成交额
	Volume    decimal.Decimal //成交量
	Open      decimal.Decimal //开盘价
	High      decimal.Decimal //高
	Low       decimal.Decimal //低
	Close     decimal.Decimal //收盘价
	Range     string          //涨跌幅
}

func (*Kline) CastToMysqlData

func (k *Kline) CastToMysqlData(symbolInfo *define.SymbolInfo) *model.Kline

func (*Kline) CastToWsData

func (k *Kline) CastToWsData(symbolInfo *define.SymbolInfo) commonWs.Kline

type KlineType

type KlineType pb.KlineType
const (
	Min1 KlineType = iota + 1
	Min5
	Min10
	Min15
	Min30
	Hour1
	Hour4
	Day1
	Week1
	Month1
)

func (KlineType) GetCycle

func (kt KlineType) GetCycle() int32

func (KlineType) String

func (kt KlineType) String() string

type MatchData

type MatchData struct {
	MessageID  pulsar.MessageID `json:"_"`
	MatchTime  int64            //撮合时间
	Volume     decimal.Decimal  //成交额
	Amount     decimal.Decimal  //成交量
	StartPrice decimal.Decimal  //本次撮合开始的价格
	EndPrice   decimal.Decimal  //本次撮合结束的价格
	Low        decimal.Decimal  //本次撮合的最高价
	High       decimal.Decimal  //本次撮合的最低价

}

type StoreKline

type StoreKline struct {
	Klines    []*Kline
	MessageID pulsar.MessageID
	IsHistory bool
}

Jump to

Keyboard shortcuts

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