Documentation ¶
Index ¶
- Constants
- func Backup(days int)
- func BackupCodes()
- func BackupDays(days int) bool
- func DirCodesPath() string
- func DirHisPath(code string) string
- func GetReal(isS bool, code []string) (string, error)
- func GetStockCodes() ([]string, error)
- func ReadCodes() ([]string, error)
- func SplitRealStr(str string) map[string][]string
- func StockIsSh(code string) bool
- func ValidCodes(codes []string) []string
- type By
- type DayLine
- type DayLines
- func (this *DayLines) FindLowestDay(days int) (*DayLine, int)
- func (this *DayLines) Get(fromIndex, endIndex int) []DayLine
- func (this *DayLines) GetHighestPrice(days int) float64
- func (this *DayLines) GetLowestPrice(days int) float64
- func (this *DayLines) Len() int
- func (this *DayLines) Less(i, j int) bool
- func (this *DayLines) Size() int
- func (this *DayLines) Sorts(bys ...By)
- func (this *DayLines) Swap(i, j int)
- type NowLine
- type Stock
- type StockLowest
- type StockLowests
- type Stocks
Constants ¶
View Source
const ( His_Url = "" /* 173-byte string literal not displayed */ Stock_List = "http://quote.eastmoney.com/stocklist.html" Real_HQ_Url = "http://qt.gtimg.cn/q=${code}" Root_Dir = "zgcj" DLS_DIR = "dls" OUT_DIR = "output" HF_EXT = "csv" Market_SH = "sh" Market_SZ = "sz" Var_Code = "${code}" Var_Start = "${start}" Var_End = "${end}" Code_Regx_Exp = "(6|0|3)[\\d]{5}" ENC_CODE = "gbk" R_HQ_SEP = "\n" )
View Source
const ( RHQ_T = "~" RHQ_Q = "\"" )
View Source
const ( C_Step int = 60 P_SH = '6' )
Variables ¶
This section is empty.
Functions ¶
func BackupCodes ¶
func BackupCodes()
func BackupDays ¶
func DirCodesPath ¶
func DirCodesPath() string
func DirHisPath ¶
func SplitRealStr ¶
func ValidCodes ¶
Types ¶
type DayLine ¶
type DayLine struct { UTIME time.Time //更新时间 TCLOSE float64 //收盘价 HIGH float64 //最高价 LOW float64 //最低价 TOPEN float64 //开盘价 LCLOSE float64 //前收盘 CHG float64 //涨跌额 PCHG float64 //涨跌幅 TURNOVER float64 //换手率 VOTURNOVER float64 //成交量 VATURNOVER float64 //成交金额 TCAP float64 //总市值 MCAP float64 //流通市值 }
股票日线行情
type DayLines ¶
type DayLines struct {
// contains filtered or unexported fields
}
func (*DayLines) GetHighestPrice ¶
func (*DayLines) GetLowestPrice ¶
type NowLine ¶
type NowLine struct { NDAY *DayLine HLIMIT float64 //涨停价 LLIMIT float64 //跌停价 PEV float64 //市盈率 PBV float64 //市净率 AMP float64 //振幅 }
func NewNowLine ¶
type Stock ¶
type Stock struct { Code string Name string Now *NowLine Before *DayLines // contains filtered or unexported fields }
func (*Stock) ReadHistory ¶
type StockLowests ¶
type StockLowests []StockLowest
func (StockLowests) Len ¶
func (c StockLowests) Len() int
func (StockLowests) Less ¶
func (c StockLowests) Less(i, j int) bool
func (StockLowests) Swap ¶
func (c StockLowests) Swap(i, j int)
type Stocks ¶
type Stocks struct {
// contains filtered or unexported fields
}
func (*Stocks) UpdateHistory ¶
Click to show internal directories.
Click to hide internal directories.