security

package
v0.7.15 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ResourcesPath 资源路径
	ResourcesPath = "resources"
	// MarketName 市场名称
	MarketName = map[string]string{
		category.MARKET_SH: "上海",
		category.MARKET_SZ: "深圳",
		category.MARKET_HK: "香港",
	}
	MarketSecurity = map[string]int32{
		category.MARKET_SH: int32(futu.QotMarket_QotMarket_CNSH_Security),
		category.MARKET_SZ: int32(futu.QotMarket_QotMarket_CNSZ_Security),
		category.MARKET_HK: int32(futu.QotMarket_QotMarket_HK_Security),
	}
)
View Source
var (
	// ErrCacheNotExist 没有缓存
	ErrCacheNotExist = errors.New("Cache not exist")
	// ErrCodeNotExist 证券代码不存在
	ErrCodeNotExist = errors.New("Securities code does not exist")
)

Functions

func GetStockCode

func GetStockCode(market string, code string) string

func WriteBasicInfo

func WriteBasicInfo(market string, array []byte)

Types

type Security

type Security struct {
	Market int32  `json:"market,omitempty"` //QotMarket,股票市场
	Code   string `json:"code,omitempty"`   //股票代码
}

Security 两个字段确定一支股票

type StaticBasic

type StaticBasic struct {
	Security      Security `json:"security,omitempty"`      //股票
	Id            int64    `json:"id,omitempty"`            //股票ID
	LotSize       int32    `json:"lotSize,omitempty"`       //每手数量,期权以及期货类型表示合约乘数
	SecType       int32    `json:"secType,omitempty"`       //Qot_Common.SecurityType,股票类型
	Name          string   `json:"name,omitempty"`          //股票名字
	ListTime      string   `json:"listTime,omitempty"`      //上市时间字符串
	Delisting     bool     `json:"delisting,omitempty"`     //是否退市
	ListTimestamp float64  `json:"listTimestamp,omitempty"` //上市时间戳, 秒数

}

func GetBasicInfo

func GetBasicInfo(code string) (*StaticBasic, error)

func GetStaticBasic

func GetStaticBasic(market string) (list []StaticBasic, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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