cache

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CACHE_DATE = "20060102"   // 缓存日期
	INDEX_DATE = "2006-01-02" // 索引日期格式
	TDX_DATE   = "20060102"   // 通达信日期
	YearOnly   = "2006"       // 仅年份
)
View Source
const (
	TdxTickDateFormat = "20060102" // 分笔成交数据使用的日期格式
)

Variables

This section is empty.

Functions

func CacheId

func CacheId(code string) string

CacheId 通过代码构建目录结构

func CacheIdPath

func CacheIdPath(code string) string

CacheIdPath code从后保留3位, 市场缩写+从头到倒数第3的代码, 确保每个目录只有000~999个代码

func CorrectDate

func CorrectDate(date string) string

CorrectDate 矫正日期, 统一格式: 20060102

func FeatureFilename

func FeatureFilename(code string) string

FeatureFilename 特征数据缓存路径

func FundFlowFilename

func FundFlowFilename(securityCode string) string

FundFlowFilename 通过证券代码获取资金流向的缓存文件路径

func GetConfigFilename

func GetConfigFilename() string

GetConfigFilename 获取配置文件路径

func GetDayPath

func GetDayPath() string

GetDayPath 历史数据-日线缓存路径

func GetFeaturesPath

func GetFeaturesPath() string

GetFeaturesPath 获取特征路径

func GetFundFlowPath

func GetFundFlowPath() string

GetFundFlowPath 资金流向目录

func GetHoldingPath

func GetHoldingPath() string

GetHoldingPath 十大流通股股东数据路径

func GetLoggerPath

func GetLoggerPath() string

GetLoggerPath 获取日志路径

func GetMetaPath

func GetMetaPath() string

GetMetaPath 元数据路径

func GetRootPath

func GetRootPath() string

GetRootPath 获取缓存根路径

func GetSnapshotPath

func GetSnapshotPath() string

GetSnapshotPath 快照路径

func GetTickPath

func GetTickPath() string

GetTickPath tick数据路径

func GetVariablePath

func GetVariablePath() string

GetVariablePath 获取VAR路径

func GetXdxrPath

func GetXdxrPath() string

GetXdxrPath 除权除息文件存储路径

func GetZxgFile

func GetZxgFile() string

GetZxgFile 自选股文件路径

func KLineFilename

func KLineFilename(code string) string

KLineFilename 基础K线缓存路径

func SnapshotFilename

func SnapshotFilename(securityCode string) string

SnapshotFilename 快照数据文件

func TickFilename

func TickFilename(code, date string) string

TickFilename tick文件比较多, 目录结构${tick}/${YYYY}/${YYYYMMDD}/${CacheIdPath}

func Today

func Today() string

func Top10HoldersQuartlyReportFilename

func Top10HoldersQuartlyReportFilename(code, date string) string

Top10HoldersQuartlyReportFilename 前十大流通股股东缓存文件名

func XdxrFilename

func XdxrFilename(code string) string

XdxrFilename XDXR缓存路径

Types

type Quant1XConfig

type Quant1XConfig struct {
	BaseDir string `json:"basedir"`
}

Quant1XConfig Quant1X基础配置

type SecurityFeature

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

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 换手数据概要

Jump to

Keyboard shortcuts

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