Documentation ¶
Index ¶
- Constants
- Variables
- func BlockFilename(ns ...string) string
- func CacheId(code string) string
- func CacheIdPath(code string) string
- func CorrectDate(date string) string
- func FeatureFilename(code string) string
- func FileExist(path string) bool
- func FileIsValid(path string) bool
- func FinanceInfoFilename() string
- func GetBkPath() string
- func GetCache(fullCode string) *os.File
- func GetDayPath() stringdeprecated
- func GetFeaturesPath() string
- func GetFreeGuBen(securityCode string) float64
- func GetInfoPath() string
- func GetKaipanVol(securityCode string) float64
- func GetLiuTongPan(securityCode string) float64
- func GetSnapshotPath() string
- func GetTickFilename(code string, date string, createPath bool) string
- func GetTickPath() string
- func GetXdxrPath() string
- func GetZongGuben(securityCode string) float64
- func GetZxgFile() string
- func HoldingFilename() string
- func KLineFilename(code string) stringdeprecated
- func SnapshotFilename(code string) string
- func TickFilename(code string, date string) string
- func TickKaiPanFilename() string
- func Today() string
- func UpdateTickStartDate(date string)
- func XdxrFilename(code string) string
- type CacheKaipan
- type CacheType
- type FastCache
- type Security
- type SecurityFeature
- type TurnoverDataSummary
Constants ¶
View Source
const ( DAY_PATH = "day" // 日线路径 INFO_PATH = "info" // 信息路径 TICK_PATH = "tick" // tick路径 XDXR_PATH = "xdxr" // 除权除息路径 BLOCK_PATH = "bk" // 板块数据 SNAPSHOT_PATH = "snapshot" // 快照数据路径 FEATURE_PATH = "features" // 特征路径 )
Variables ¶
View Source
var (
// TickStartDate 最早的时间
TickStartDate = "20220101"
)
Functions ¶
func CacheIdPath ¶ added in v0.7.6
CacheIdPath code从后保留3位, 市场缩写+从头到倒数第3的代码, 确保每个目录只有000~999个代码
func CorrectDate ¶ added in v0.7.6
CorrectDate 矫正日期, 统一格式: 20060102
func FeatureFilename ¶ added in v1.2.9
FeatureFilename 特征数据缓存路径
func FinanceInfoFilename ¶ added in v1.1.5
func FinanceInfoFilename() string
FinanceInfoFilename F10缓存路径
func GetDayPath
deprecated
func GetFreeGuBen ¶ added in v1.1.15
GetFreeGuBen 获取自由流通股本
func GetKaipanVol ¶ added in v1.1.15
GetKaipanVol 获取开盘量
func GetLiuTongPan ¶ added in v1.1.15
GetLiuTongPan 获取流通盘
func GetTickFilename ¶ added in v1.0.0
func GetZongGuben ¶ added in v1.1.17
GetZongGuben 获取总股本
func KLineFilename
deprecated
added in
v0.7.6
func SnapshotFilename ¶ added in v0.8.16
SnapshotFilename snapshot缓存路径
func TickFilename ¶ added in v0.7.4
TickFilename tick文件比较多, 目录结构${tick}/${YYYY}/${YYYYMMDD}/${CacheIdPath}
func TickKaiPanFilename ¶ added in v1.1.9
func TickKaiPanFilename() string
TickKaiPanFilename 开盘量缓存文件
func UpdateTickStartDate ¶ added in v0.8.0
func UpdateTickStartDate(date string)
UpdateTickStartDate 修改tick数据开始下载的日期
Types ¶
type CacheKaipan ¶ added in v1.1.15
type CacheType ¶
type CacheType int
const ( CACHE_CSV CacheType = iota // CSV CACHE_EXCEL CacheType = 1 // EXCEL CACHE_TARS CacheType = 2 // Tencent Tars CACHE_PROTOBUF CacheType = 3 // ProtoBuf )
缓存类型
var ( // CACHE_ROOT_PATH cache路径 CACHE_ROOT_PATH = category.DATA_ROOT_PATH CACHE_TYPE CacheType = CACHE_TARS )
type Security ¶ added in v1.1.5
type Security struct { Code string // 代码 Name string // 名称 VolUnit int // 每手单位 DecimalPoint int // 小数点 IpoDate string // 上市日期 UpdateDate string // 更新日期 ZongGB float64 // 总股本 LiuTongGB float64 // 流通股本 Top10GB float64 // 前十大流通股东股本 FreeGB float64 // 自由流通股本 ChangeGB float64 // 前十大流通股东持仓变化 IncreaseRatio float64 // 当期增持比例 ReductionRatio float64 // 当期减持比例 }
Security 证券基础信息
type SecurityFeature ¶ added in v1.3.26
type SecurityFeature struct { Date string `json:"Date" array:"0" name:"日期" dataframe:"date,string"` Open float64 `json:"Open" array:"1" name:"开盘" dataframe:"open,float64"` Close float64 `json:"Close" array:"2" name:"收盘" dataframe:"close,float64"` High float64 `json:"High" array:"3" name:"最高" dataframe:"high,float64"` Low float64 `json:"Low" array:"4" name:"最低" dataframe:"low,float64"` Volume int64 `json:"Volume" array:"5" name:"成交量" dataframe:"volume,int64"` Amount float64 `json:"Amount" array:"6" name:"成交额" dataframe:"amount,float64"` Up int `json:"Up" array:"7" name:"上涨家数" dataframe:"up,int64"` Down int `json:"Down" array:"8" name:"下跌家数" dataframe:"down,int64"` LastClose float64 `json:"LastClose" array:"9" name:"昨收" dataframe:"last_close,float64"` TurnoverRate float64 `json:"TurnoverRate" array:"10" name:"换手率" dataframe:"turnover_rate,float64"` OpenVolume int64 `json:"OpenVolume" array:"11" name:"开盘量" dataframe:"open_volume,int64"` OpenTurnZ float64 `json:"OpenTurnZ" array:"12" name:"开盘换手z" dataframe:"open_turnz,float64"` OpenUnmatched int64 `json:"OpenUnmatched" array:"13" name:"开盘未匹配" dataframe:"open_unmatched,int64"` CloseVolume int64 `json:"CloseVolume" array:"14" name:"收盘量" dataframe:"close_volume,int64"` CloseTurnZ float64 `json:"CloseTurnZ" array:"15" name:"收盘换手z" dataframe:"close_turnz,float64"` CloseUnmatched int64 `json:"CloseUnmatched" array:"16" name:"收盘未匹配" dataframe:"close_unmatched,int64"` InnerVolume int64 `json:"InnerVolume" array:"17" name:"内盘" dataframe:"inner_volume,int64"` OuterVolume int64 `json:"OuterVolume" array:"18" name:"外盘" dataframe:"outer_volume,int64"` InnerAmount float64 `json:"InnerAmount" array:"19" name:"流出金额" dataframe:"inner_amount,float64"` OuterAmount float64 `json:"OuterAmount" array:"20" name:"流入金额" dataframe:"outer_amount,float64"` }
SecurityFeature 证券特征信息
type TurnoverDataSummary ¶ added in v1.3.26
type TurnoverDataSummary struct { OpenVolume int64 `json:"OpenVolume" array:"0" name:"开盘量" dataframe:"open_volume,int64"` OpenTurnZ float64 `json:"OpenTurnZ" array:"1" name:"开盘换手z" dataframe:"open_turnz,float64"` OpenUnmatched int64 `json:"OpenUnmatched" array:"2" name:"开盘未匹配" dataframe:"open_unmatched,int64"` CloseVolume int64 `json:"CloseVolume" array:"3" name:"收盘量" dataframe:"close_volume,int64"` CloseTurnZ float64 `json:"CloseTurnZ" array:"4" name:"收盘换手z" dataframe:"close_turnz,float64"` CloseUnmatched int64 `json:"CloseUnmatched" array:"5" name:"收盘未匹配" dataframe:"close_unmatched,int64"` InnerVolume int64 `json:"InnerVolume" array:"6" name:"内盘" dataframe:"inner_volume,int64"` OuterVolume int64 `json:"OuterVolume" array:"7" name:"外盘" dataframe:"outer_volume,int64"` InnerAmount float64 `json:"InnerAmount" array:"8" name:"流出金额" dataframe:"inner_amount,float64"` OuterAmount float64 `json:"OuterAmount" array:"9" name:"流入金额" dataframe:"outer_amount,float64"` }
TurnoverDataSummary 换手数据概要
Click to show internal directories.
Click to hide internal directories.