Documentation ¶
Index ¶
- Constants
- Variables
- func BlockTypeNameByCode(blockCode int) (name string, ok bool)
- func BlockTypeNameByTypeCode(blockType BlockType) (string, bool)
- func GetStockCode(market string, code string) string
- func OpenEmbed(name string) (fs.File, error)
- func WriteBasicInfo(market string, array []byte)
- type BlockInfo
- type BlockType
- type HyInfo
- type Security
- type StaticBasic
Constants ¶
View Source
const ( //BK_UNKNOWN BlockType = iota BK_HANGYE BlockType = 2 // 行业 BK_DIQU BlockType = 3 // 地区 BK_GAINIAN BlockType = 4 // 概念 BK_FENGGE BlockType = 5 // 风格 BK_ZHISHU BlockType = 6 // 指数 BK_YJHY BlockType = 12 // 研究行业 BKN_HANGYE = "行业" BKN_DIQU = "地区" BKN_GAINIAN = "概念" BKN_FENGGE = "风格" BKN_ZHISHU = "指数" BKN_YJHY = "研究行业" )
Variables ¶
View Source
var ( // MarketName 市场名称 MarketName = map[string]string{ proto.MarketShangHai: "上海", proto.MarketShenZhen: "深圳", proto.MarketHongKong: "香港", } MarketSecurity = map[string]int32{ proto.MarketShangHai: int32(futu.QotMarket_QotMarket_CNSH_Security), proto.MarketShenZhen: int32(futu.QotMarket_QotMarket_CNSZ_Security), proto.MarketHongKong: 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") )
View Source
var (
// ResourcesPath 资源路径
ResourcesPath = "resources"
)
Functions ¶
func BlockTypeNameByCode ¶ added in v1.0.4
BlockTypeNameByCode 通过板块类型代码获取板块类型名称
func BlockTypeNameByTypeCode ¶ added in v1.2.2
BlockTypeNameByTypeCode 通过板块类型代码获取板块类型名称
func GetStockCode ¶
func WriteBasicInfo ¶
Types ¶
type BlockInfo ¶ added in v0.8.11
type BlockInfo struct { Name string // 名称 Code string // 代码 Type int // 类型 Count int // 个股数量 Block string // 通达信板块编码 List []string // 代码列表 }
BlockInfo 板块信息
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)
Click to show internal directories.
Click to hide internal directories.