security

package
v0.8.16 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BK_HANGYE  = 2  // 行业
	BK_DIQU    = 3  // 地区
	BK_GAINIAN = 4  // 概念
	BK_FENGGE  = 5  // 风格
	BK_ZHISHU  = 6  // 指数
	BK_YJHY    = 12 // ??

	BKN_HANGYE  = "行业"
	BKN_DIQU    = "地区"
	BKN_GAINIAN = "概念"
	BKN_FENGGE  = "风格"
	BKN_ZHISHU  = "指数"
	BKN_YJHY    = "研究行业"
)

Variables

View Source
var (
	// ErrCacheNotExist 没有缓存
	ErrCacheNotExist = errors.New("Cache not exist")
	// ErrCodeNotExist 证券代码不存在
	ErrCodeNotExist = errors.New("Securities code does not exist")
)
View Source
var (
	// ResourcesPath 资源路径
	ResourcesPath = "resources"
)

Functions

func GetStockCode

func GetStockCode(market string, code string) string

func OpenEmbed added in v0.8.11

func OpenEmbed(name string) (fs.File, error)

OpenEmbed 打开嵌入式文件

func WriteBasicInfo

func WriteBasicInfo(market string, array []byte)

Types

type BlockInfo added in v0.8.11

type BlockInfo struct {
	Name  string   // 名称
	Code  string   // 代码
	Type  int      // 类型
	Count int      // 个股数量
	List  []string // 代码列表
}

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