securities

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 19 Imported by: 5

Documentation

Index

Constants

View Source
const (
	BK_UNKNOWN BlockType = 0  // 未知类型
	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 (
	// ResourcesPath 资源路径
	ResourcesPath = "resources"
)

Functions

func AllCodeList

func AllCodeList() []string

AllCodeList 获取全部证券代码

func BlockTypeNameByCode

func BlockTypeNameByCode(blockCode int) (name string, ok bool)

BlockTypeNameByCode 通过板块类型代码获取板块类型名称

func BlockTypeNameByTypeCode

func BlockTypeNameByTypeCode(blockType BlockType) (string, bool)

BlockTypeNameByTypeCode 通过板块类型代码获取板块类型名称

func CheckoutSecurityInfo

func CheckoutSecurityInfo(securityCode string) (*quotes.Security, bool)

CheckoutSecurityInfo 获取证券名称

func GetStockName

func GetStockName(securityCode string) string

GetStockName 获取证券名称

func IndexList

func IndexList() []string

IndexList 指数列表

func OpenEmbed

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

OpenEmbed 打开嵌入式文件

Types

type BlockInfo

type BlockInfo struct {
	Name              string   `dataframe:"name"`              // 名称
	Code              string   `dataframe:"code"`              // 代码
	Type              int      `dataframe:"type"`              // 类型
	Count             int      `dataframe:"count"`             // 个股数量
	Block             string   `dataframe:"block"`             // 通达信板块编码
	ConstituentStocks []string `dataframe:"ConstituentStocks"` // 板块成份股
}

BlockInfo 板块信息

func BlockList

func BlockList() (list []BlockInfo)

BlockList 板块列表

func GetBlockInfo

func GetBlockInfo(code string) *BlockInfo

type BlockType

type BlockType = int

type IndustryInfo

type IndustryInfo struct {
	Code   string // 股票代码
	Block  string // 行业板块代码
	Block5 string // 二级行业板块代码
}

IndustryInfo 行业板块对应

Jump to

Keyboard shortcuts

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