Documentation ¶
Index ¶
- Variables
- func ForecastFastGet(requestParam ForecastRequestParam) ([]byte, error)
- func GetCachePinYin() map[string]*entity.PinYin
- func RefreshCachePinYin()
- type AccValue
- type BalanceSheetService
- type CashFlowService
- type DayLineService
- func (svc *DayLineService) Aggregation(dayLines []*entity.DayLine) (map[stock.AggregationType]*entity.DayLine, []interface{}, []interface{})
- func (svc *DayLineService) AsyncParseFile(para interface{})
- func (svc *DayLineService) AsyncStdFile(para interface{})
- func (svc *DayLineService) AsyncUpdateBeforeMa(para interface{})
- func (svc *DayLineService) AsyncUpdateDayLine(para interface{})
- func (svc *DayLineService) AsyncUpdateStat(para interface{})
- func (svc *DayLineService) AsyncWriteFile(para interface{})
- func (svc *DayLineService) FindCorr(tsCode string, startDate int64, from int, limit int, orderby string, ...) ([]*entity.PortfolioStat, int64, error)
- func (svc *DayLineService) FindFlexPoint(tsCode string, tradeDate int64, fields []string, filterContent string, ...) (*InOutPoint, error)
- func (svc *DayLineService) FindFollowing(tsCode string, startDate int64, endDate int64, from int, limit int, ...) ([]*entity.DayLine, int64, error)
- func (svc *DayLineService) FindHighest(tsCode string, dayCount string, startDate int64, from int, limit int, ...) ([]*entity.DayLine, int64, error)
- func (svc *DayLineService) FindLatest(tsCode string) ([]*entity.DayLine, error)
- func (svc *DayLineService) FindLowest(tsCode string, dayCount string, startDate int64, from int, limit int, ...) ([]*entity.DayLine, int64, error)
- func (svc *DayLineService) FindMaCross(tsCode string, srcDayCount string, targetDayCount string, startDate int64, ...) ([]*entity.DayLine, int64, error)
- func (svc *DayLineService) FindModelData(ts_code string, industry string, startDate int64) ([]*entity.DayLine, error)
- func (svc *DayLineService) FindPreceding(tsCode string, endDate int64, from int, limit int, count int64) ([]*entity.DayLine, int64, error)
- func (svc *DayLineService) FindRange(tsCode string, startDate int64, endDate int64, limit int) ([]*entity.DayLine, error)
- func (svc *DayLineService) GetDayLine(secId string, beg int, end int, limit int, previous *entity.DayLine) ([]*entity.DayLine, error)
- func (svc *DayLineService) GetFinanceFlow(secId string, beg int, limit int) ([]*entity.DayLine, error)
- func (svc *DayLineService) GetKLine(secId string, beg int, end int, limit int, klt int) ([]string, error)
- func (svc *DayLineService) GetSeqName() string
- func (svc *DayLineService) GetUpdateDayline(secId string, beg int64, limit int) ([]*entity.DayLine, error)
- func (svc *DayLineService) LoadFile(src string, startDate int64, endDate int64, filename string) ([]*entity.DayLine, error)
- func (svc *DayLineService) NewEntities(data []byte) (interface{}, error)
- func (svc *DayLineService) NewEntity(data []byte) (interface{}, error)
- func (svc *DayLineService) ParseByte(shareId string, content []byte) []interface{}
- func (svc *DayLineService) ParseFile(src string, target string, filename string, flag int) error
- func (svc *DayLineService) ParsePath(src string, target string) error
- func (svc *DayLineService) RefreshBeforeMa(startDate int64) error
- func (svc *DayLineService) RefreshDayLine(beg int64) error
- func (svc *DayLineService) RefreshStat(startDate int64) error
- func (svc *DayLineService) Search(tsCode string, industry string, sector string, startDate int64, endDate int64, ...) ([]*entity.DayLine, int64, error)
- func (svc *DayLineService) StdFile(startDate int64, endDate int64, filename string, minmax string, ...) (map[stock.AggregationType]*entity.DayLine, error)
- func (svc *DayLineService) StdPath(src string, minmax string, standard string, startDate int64, endDate int64) error
- func (svc *DayLineService) UpdateBeforeMa(tscode string, startDate int64) (int64, error)
- func (svc *DayLineService) UpdateDayline(secId string, beg int64, limit int) ([]*entity.DayLine, error)
- func (svc *DayLineService) UpdateFinanceFlow(dayLines []*entity.DayLine, secId string, beg int, limit int) ([]*entity.DayLine, error)
- func (svc *DayLineService) UpdateStat(tscode string, startDate int64) (int64, error)
- func (svc *DayLineService) WriteAllFile(startDate int64) error
- func (svc *DayLineService) WriteFile(src string, tsCode string, startDate int64) error
- type ExpressResponse
- type ExpressResponseData
- type ExpressResponseResult
- type ExpressService
- func (this *ExpressService) AsyncUpdateExpress(para interface{})
- func (this *ExpressService) FindByQDate(securityCode string, startDate string, endDate string, orderby string) (map[string][]*entity.Express, error)
- func (this *ExpressService) FindLatest(securityCode string, latestDate string, orderby string, from int, limit int, ...) ([]*entity.Express, int64, error)
- func (this *ExpressService) GetSeqName() string
- func (this *ExpressService) GetUpdateExpress(securityCode string) ([]interface{}, error)
- func (this *ExpressService) NewEntities(data []byte) (interface{}, error)
- func (this *ExpressService) NewEntity(data []byte) (interface{}, error)
- func (this *ExpressService) RefreshExpress() error
- func (this *ExpressService) Search(securityCode string, startDate string, endDate string, orderby string, ...) ([]*entity.Express, int64, error)
- func (this *ExpressService) UpdateExpress(securityCode string) ([]interface{}, error)
- type FminLineService
- func (this *FminLineService) AsyncParseFile(para interface{})
- func (this *FminLineService) GetSeqName() string
- func (this *FminLineService) NewEntities(data []byte) (interface{}, error)
- func (this *FminLineService) NewEntity(data []byte) (interface{}, error)
- func (this *FminLineService) ParseByte(shareId string, content []byte) []*entity.FminLine
- func (this *FminLineService) ParseFile(src string, target string, filename string, flag int) error
- func (this *FminLineService) ParsePath(src string, target string) error
- func (this *FminLineService) ToCsv(fminLines []*entity.FminLine) string
- type ForecastRequestParam
- type ForecastResponse
- type ForecastResponseData
- type ForecastResponseResult
- type ForecastService
- func (this *ForecastService) AsyncUpdateForecast(para interface{})
- func (this *ForecastService) FindByQDate(securityCode string, startDate string, endDate string, orderby string) (map[string][]*entity.Forecast, error)
- func (this *ForecastService) FindLatest(securityCode string, latestDate string, orderby string, from int, limit int, ...) ([]*entity.Forecast, int64, error)
- func (this *ForecastService) GetSeqName() string
- func (this *ForecastService) GetUpdateForecast(securityCode string) ([]interface{}, error)
- func (this *ForecastService) NewEntities(data []byte) (interface{}, error)
- func (this *ForecastService) NewEntity(data []byte) (interface{}, error)
- func (this *ForecastService) RefreshForecast() error
- func (this *ForecastService) Search(securityCode string, startDate string, endDate string, orderby string, ...) ([]*entity.Forecast, int64, error)
- func (this *ForecastService) UpdateForecast(securityCode string) ([]interface{}, error)
- type InOutPoint
- type IncomeService
- type LineType
- type MinLineService
- func (svc *MinLineService) AsyncParseFile(para interface{})
- func (svc *MinLineService) AsyncUpdateMinLine(para interface{})
- func (svc *MinLineService) AsyncUpdateTodayMinLine(para interface{})
- func (svc *MinLineService) Cron() *cron.Cron
- func (svc *MinLineService) FindMinLines(tscode string, tradeDate int64, tradeMinute int64) ([]*entity.MinLine, error)
- func (svc *MinLineService) GetMinLine(secId string, beg int, limit int, klt int) ([]*entity.MinLine, error)
- func (svc *MinLineService) GetSeqName() string
- func (svc *MinLineService) GetTodayFinanceFlow(secId string) ([]*entity.MinLine, error)
- func (svc *MinLineService) GetTodayMinLine(secId string) ([]*entity.MinLine, error)
- func (svc *MinLineService) GetUpdateMinLine(secId string, beg int64, limit int) ([]*entity.MinLine, error)
- func (svc *MinLineService) GetUpdateTodayMinLine(secId string) ([]*entity.MinLine, error)
- func (svc *MinLineService) NewEntities(data []byte) (interface{}, error)
- func (svc *MinLineService) NewEntity(data []byte) (interface{}, error)
- func (svc *MinLineService) ParseByte(shareId string, content []byte) []*entity.MinLine
- func (svc *MinLineService) ParseFile(src string, target string, filename string, flag int) error
- func (svc *MinLineService) ParsePath(src string, target string) error
- func (svc *MinLineService) RefreshMinLine(beg int64) error
- func (svc *MinLineService) RefreshToday()
- func (svc *MinLineService) RefreshTodayMinLine() error
- func (svc *MinLineService) ToCsv(minLines []*entity.MinLine) string
- func (svc *MinLineService) UpdateMinLine(secId string, beg int64, limit int) ([]*entity.MinLine, error)
- func (svc *MinLineService) UpdateTodayFinanceFlow(minLines []*entity.MinLine, secId string) ([]*entity.MinLine, error)
- func (svc *MinLineService) UpdateTodayMinLine(secId string) ([]*entity.MinLine, error)
- type PerformanceResponse
- type PerformanceResponseData
- type PerformanceResponseResult
- type PerformanceService
- func (svc *PerformanceService) AsyncUpdatePerformance(para interface{})
- func (svc *PerformanceService) FindByQDate(securityCode string, startDate string, endDate string, orderby string, ...) ([]*entity.Performance, int64, error)
- func (svc *PerformanceService) FindLatest(securityCode string, latestNoticeDate string, orderby string, from int, ...) ([]*entity.Performance, int64, error)
- func (svc *PerformanceService) GetSeqName() string
- func (svc *PerformanceService) GetUpdatePerformance(securityCode string) ([]interface{}, error)
- func (svc *PerformanceService) NewEntities(data []byte) (interface{}, error)
- func (svc *PerformanceService) NewEntity(data []byte) (interface{}, error)
- func (svc *PerformanceService) RefreshPerformance() error
- func (svc *PerformanceService) UpdatePerformance(securityCode string) ([]interface{}, error)
- type PerformanceType
- type PinYinService
- type PortfolioStatService
- func (this *PortfolioStatService) AsyncUpdatePortfolioStat(para interface{})
- func (this *PortfolioStatService) FindPortfolioStat(ts_code string, term int64, from int, limit int, orderby string, count int64) ([]*entity.PortfolioStat, int64, error)
- func (this *PortfolioStatService) GetSeqName() string
- func (this *PortfolioStatService) GetUpdatePortfolioStat(tscode string) ([]interface{}, error)
- func (this *PortfolioStatService) NewEntities(data []byte) (interface{}, error)
- func (this *PortfolioStatService) NewEntity(data []byte) (interface{}, error)
- func (this *PortfolioStatService) RefreshPortfolioStat() error
- func (this *PortfolioStatService) UpdatePortfolioStat(tscode string) error
- type ProcessLogService
- func (this *ProcessLogService) Cron() *cron.Cron
- func (this *ProcessLogService) EndLog(processLog *entity.ProcessLog, errorCode string, errorMsg string)
- func (this *ProcessLogService) GetSeqName() string
- func (this *ProcessLogService) NewEntities(data []byte) (interface{}, error)
- func (this *ProcessLogService) NewEntity(data []byte) (interface{}, error)
- func (this *ProcessLogService) Schedule()
- func (this *ProcessLogService) StartLog(name string, methodName string, bizCode string) *entity.ProcessLog
- type QPerformanceService
- func (svc *QPerformanceService) AsyncUpdateDayQPerformance(para interface{})
- func (svc *QPerformanceService) AsyncUpdateWmqyQPerformance(para interface{})
- func (svc *QPerformanceService) Compute(qpMap map[string][]interface{}, previousMap map[string]*entity.QPerformance)
- func (svc *QPerformanceService) FindAccBySql(tsCode string, startDate string) (map[string][]interface{}, error)
- func (svc *QPerformanceService) FindAllQStatBySql(tsCode string, startDate string, endDate string) map[string][]interface{}
- func (svc *QPerformanceService) FindByQDate(tsCode string, startDate string, endDate string, orderby string, from int, ...) ([]*entity.QPerformance, int64, error)
- func (svc *QPerformanceService) FindPercentRank(rankType string, tsCode string, tradeDate int64, startDate string, ...) ([]*entity.QPerformance, error)
- func (svc *QPerformanceService) FindQExpress(lineType LineType, tsCode string, startDate string, endDate string) (map[string][]interface{}, error)
- func (svc *QPerformanceService) FindQForecast(lineType LineType, tsCode string, startDate string, endDate string) (map[string][]interface{}, error)
- func (svc *QPerformanceService) FindQPerformance(lineType LineType, tsCode string, startDate string, endDate string) (map[string][]interface{}, error)
- func (svc *QPerformanceService) FindQStatBySql(aggregationType string, tsCode string, startDate string, endDate string, ...) (map[string][]interface{}, error)
- func (svc *QPerformanceService) FindStdQPerformance(tsCode string, terms []int, startDate string, endDate string, stdType StdType, ...) (map[string][]*entity.QPerformance, error)
- func (svc *QPerformanceService) GetQTerm(qpMap map[string][]*entity.QPerformance, terms []int) (map[string]map[int]*QTerm, error)
- func (svc *QPerformanceService) GetQTermBySql(tscode string, term int) (*QTerm, error)
- func (svc *QPerformanceService) GetSeqName() string
- func (svc *QPerformanceService) GetUpdateDayQPerformance(tscode string) ([]interface{}, error)
- func (svc *QPerformanceService) GetUpdateWmqyQPerformance(tscode string, startDate string) ([]interface{}, error)
- func (svc *QPerformanceService) NewEntities(data []byte) (interface{}, error)
- func (svc *QPerformanceService) NewEntity(data []byte) (interface{}, error)
- func (svc *QPerformanceService) RefreshDayQPerformance() error
- func (svc *QPerformanceService) RefreshWmqyQPerformance(startDate string) error
- func (svc *QPerformanceService) Search(keyword string, tscode string, terms []int, sourceOptions []string, ...) ([]*entity.QPerformance, int64, error)
- func (svc *QPerformanceService) Std(ps []interface{}, stdType StdType, isWinsorize bool) []*entity.QPerformance
- func (svc *QPerformanceService) StdMap(psMap map[string][]interface{}, stdType StdType, isWinsorize bool) map[string][]*entity.QPerformance
- type QStatService
- func (svc *QStatService) AsyncUpdateQStat(para interface{})
- func (svc *QStatService) FindAcc(ps []interface{}, qterm *QTerm, pre *entity.QPerformance) *entity.QStat
- func (svc *QStatService) FindAllQStat(qpMap map[string][]*entity.QPerformance, qtermMap map[string]map[int]*QTerm) map[string][]interface{}
- func (svc *QStatService) FindPercentRank(tscode string, qterm *QTerm) ([]*entity.QStat, error)
- func (svc *QStatService) FindQStat(tsCode string, terms []int, source string, sourceName string) (map[string]map[int][]interface{}, error)
- func (svc *QStatService) FindQStatBy(tsCode string, terms []int, source []string, orderby string, from int, ...) ([]*entity.QStat, int64, error)
- func (svc *QStatService) FindQStatMedian() (map[string]*entity.QStat, error)
- func (svc *QStatService) GetQStatMedian() error
- func (svc *QStatService) GetSeqName() string
- func (svc *QStatService) GetUpdateQStat(tscode string) ([]interface{}, error)
- func (svc *QStatService) MinmaxStd(q *entity.QStat, fieldname string) float64
- func (svc *QStatService) NewEntities(data []byte) (interface{}, error)
- func (svc *QStatService) NewEntity(data []byte) (interface{}, error)
- func (svc *QStatService) RefreshQStat() error
- func (svc *QStatService) Search(keyword string, terms []int, sourceOptions []string, from int, limit int, ...) ([]*entity.QStat, int64, error)
- func (svc *QStatService) UpdatePercentRank(tscode string, qtermMap map[string]map[int]*QTerm) ([]interface{}, error)
- func (svc *QStatService) UpdateQStat(tscode string, terms []int) ([]interface{}, error)
- func (svc *QStatService) UpdateQStatBySql(tscode string, term int) ([]interface{}, error)
- type QTerm
- type ShareEventService
- type ShareRequest
- type ShareService
- func (svc *ShareService) GetCacheShare() ([]string, map[string]*entity.Share)
- func (svc *ShareService) GetSeqName() string
- func (svc *ShareService) GetShares(tsCode string) ([]interface{}, error)
- func (svc *ShareService) NewEntities(data []byte) (interface{}, error)
- func (svc *ShareService) NewEntity(data []byte) (interface{}, error)
- func (svc *ShareService) RefreshCacheShare()
- func (svc *ShareService) Search(keyword string, from int, limit int) ([]*entity.Share, error)
- func (svc *ShareService) UpdatePinYin()
- func (svc *ShareService) UpdateSector(tsCode string, sector string)
- func (svc *ShareService) UpdateShares()
- type StatScoreService
- func (svc *StatScoreService) AsyncUpdateStatScore(para interface{})
- func (svc *StatScoreService) CreateScorePercentile() (int64, error)
- func (svc *StatScoreService) FindStatScoreMedian() (map[string]*entity.StatScore, error)
- func (svc *StatScoreService) GetSeqName() string
- func (svc *StatScoreService) GetUpdateStatScore(tsCode string) (map[string]map[int]*entity.StatScore, error)
- func (svc *StatScoreService) NewEntities(data []byte) (interface{}, error)
- func (svc *StatScoreService) NewEntity(data []byte) (interface{}, error)
- func (svc *StatScoreService) RefreshStatScore() error
- func (svc *StatScoreService) Search(keyword string, tscode string, terms []int, orderby string, from int, ...) ([]*entity.StatScore, int64, error)
- type StdType
- type TodayMinLineResponseData
- type TodayMinLineResponseResult
- type UserShare
- type WmqyLineBuf
- type WmqyLineService
- func (svc *WmqyLineService) AsyncStdFile(para interface{})
- func (svc *WmqyLineService) AsyncUpdateWmqyLine(para interface{})
- func (svc *WmqyLineService) FindFollowing(tsCode string, lineType int, startDate string, endDate string, from int, ...) ([]*entity.WmqyLine, int64, error)
- func (svc *WmqyLineService) FindPreceding(tsCode string, lineType int, endDate string, from int, limit int, count int64) ([]*entity.WmqyLine, int64, error)
- func (svc *WmqyLineService) GetSeqName() string
- func (svc *WmqyLineService) GetUpdateWmqyLine(secId string, beg int64, limit int, wmqy *WmqyLineBuf) ([]interface{}, error)
- func (svc *WmqyLineService) GetWmqyLine(secId string, beg int64, end int, limit int, klt int, ...) ([]*entity.WmqyLine, error)
- func (svc *WmqyLineService) NewEntities(data []byte) (interface{}, error)
- func (svc *WmqyLineService) NewEntity(data []byte) (interface{}, error)
- func (svc *WmqyLineService) RefreshWmqyLine(beg int64) error
- func (svc *WmqyLineService) StdFile(minmax string, standard string, _startDate int64, _endDate int64, ...) (map[stock.AggregationType]*entity.QPerformance, error)
- func (svc *WmqyLineService) StdPath(minmax string, standard string, startDate int64, endDate int64) error
- func (svc *WmqyLineService) UpdateWmqyLine(secId string, beg int64, limit int, wmqy *WmqyLineBuf) ([]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
var CalRoutinePoolSize = 30
var DaylineHeader = []string{"id", "trade_date", "open", "high", "low", "close", "amount", "vol", "turnover",
"main_net_inflow", "small_net_inflow", "middle_net_inflow", "large_net_inflow", "super_net_inflow",
"pct_chg_open", "pct_chg_high", "pct_chg_low", "pct_chg_close", "pct_chg_amount", "pct_chg_vol",
"pct_main_net_inflow", "pct_small_net_inflow", "pct_middle_net_inflow", "pct_large_net_inflow", "pct_super_net_inflow"}
var NetRoutinePoolSize = 20
var WmqylineHeader = []string{"ts_code", "security_name", "qdate", "share_number", "ep", "high", "close", "pct_chg_high",
"pct_chg_close", "weight_avg_roe", "gross_profit_margin", "parent_net_profit", "basic_eps",
"or_last_month", "np_last_month", "yoy_sales", "yoy_dedu_np", "cfps", "dividend_yield_ratio"}
Functions ¶
func ForecastFastGet ¶
func ForecastFastGet(requestParam ForecastRequestParam) ([]byte, error)
func GetCachePinYin ¶
func RefreshCachePinYin ¶
func RefreshCachePinYin()
Types ¶
type BalanceSheetService ¶
type BalanceSheetService struct {
service.OrmBaseService
}
* 同步表结构,服务继承基本服务的方法
func GetBalanceSheetService ¶
func GetBalanceSheetService() *BalanceSheetService
func (*BalanceSheetService) GetSeqName ¶
func (this *BalanceSheetService) GetSeqName() string
func (*BalanceSheetService) NewEntities ¶
func (this *BalanceSheetService) NewEntities(data []byte) (interface{}, error)
func (*BalanceSheetService) NewEntity ¶
func (this *BalanceSheetService) NewEntity(data []byte) (interface{}, error)
type CashFlowService ¶
type CashFlowService struct {
service.OrmBaseService
}
* 同步表结构,服务继承基本服务的方法
func GetCashFlowService ¶
func GetCashFlowService() *CashFlowService
func (*CashFlowService) GetSeqName ¶
func (this *CashFlowService) GetSeqName() string
func (*CashFlowService) NewEntities ¶
func (this *CashFlowService) NewEntities(data []byte) (interface{}, error)
func (*CashFlowService) NewEntity ¶
func (this *CashFlowService) NewEntity(data []byte) (interface{}, error)
type DayLineService ¶
type DayLineService struct {
service.OrmBaseService
}
DayLineService 同步表结构,服务继承基本服务的方法
func GetDayLineService ¶
func GetDayLineService() *DayLineService
func (*DayLineService) Aggregation ¶
func (svc *DayLineService) Aggregation(dayLines []*entity.DayLine) (map[stock.AggregationType]*entity.DayLine, []interface{}, []interface{})
func (*DayLineService) AsyncParseFile ¶
func (svc *DayLineService) AsyncParseFile(para interface{})
func (*DayLineService) AsyncStdFile ¶
func (svc *DayLineService) AsyncStdFile(para interface{})
func (*DayLineService) AsyncUpdateBeforeMa ¶
func (svc *DayLineService) AsyncUpdateBeforeMa(para interface{})
func (*DayLineService) AsyncUpdateDayLine ¶
func (svc *DayLineService) AsyncUpdateDayLine(para interface{})
func (*DayLineService) AsyncUpdateStat ¶
func (svc *DayLineService) AsyncUpdateStat(para interface{})
func (*DayLineService) AsyncWriteFile ¶
func (svc *DayLineService) AsyncWriteFile(para interface{})
func (*DayLineService) FindCorr ¶
func (svc *DayLineService) FindCorr(tsCode string, startDate int64, from int, limit int, orderby string, count int64) ([]*entity.PortfolioStat, int64, error)
FindCorr 查找收盘价相关性的股票
func (*DayLineService) FindFlexPoint ¶
func (svc *DayLineService) FindFlexPoint(tsCode string, tradeDate int64, fields []string, filterContent string, filterParas []interface{}, startDate int64, endDate int64, from int, limit int, count int64) (*InOutPoint, error)
FindFlexPoint 最基本的查询买卖点的方法,最为灵活 条件包括tsCode,tradeDate,filterContent(filterParas),startDate,endDate 如果filterContent中有?,则filterParas中必须有对应的参数值
func (*DayLineService) FindFollowing ¶
func (svc *DayLineService) FindFollowing(tsCode string, startDate int64, endDate int64, from int, limit int, count int64) ([]*entity.DayLine, int64, error)
FindFollowing 获取某时间点后limit条数据,如果没有日期范围的指定,就是返回最早limit条数据
func (*DayLineService) FindHighest ¶
func (svc *DayLineService) FindHighest(tsCode string, dayCount string, startDate int64, from int, limit int, count int64) ([]*entity.DayLine, int64, error)
FindHighest 获取某时间点后,前后dayCount内的是最高点的,limit条数据
func (*DayLineService) FindLatest ¶ added in v0.1.24
func (svc *DayLineService) FindLatest(tsCode string) ([]*entity.DayLine, error)
查询最新的日期的股票日线数据
func (*DayLineService) FindLowest ¶
func (svc *DayLineService) FindLowest(tsCode string, dayCount string, startDate int64, from int, limit int, count int64) ([]*entity.DayLine, int64, error)
FindLowest 获取某时间点后,前后dayCount内的是最高点的,limit条数据
func (*DayLineService) FindMaCross ¶
func (svc *DayLineService) FindMaCross(tsCode string, srcDayCount string, targetDayCount string, startDate int64, cross string, from int, limit int, count int64) ([]*entity.DayLine, int64, error)
FindMaCross 获取某时间点后,两dayCount均线交叉的,limit条数据
func (*DayLineService) FindModelData ¶
func (svc *DayLineService) FindModelData(ts_code string, industry string, startDate int64) ([]*entity.DayLine, error)
FindModelData 获取某只股票最新的日期
func (*DayLineService) FindPreceding ¶
func (svc *DayLineService) FindPreceding(tsCode string, endDate int64, from int, limit int, count int64) ([]*entity.DayLine, int64, error)
FindPreceding 获取某时间点前limit条数据,如果没有日期范围的指定,就是返回最新的回溯limit条数据
func (*DayLineService) FindRange ¶
func (svc *DayLineService) FindRange(tsCode string, startDate int64, endDate int64, limit int) ([]*entity.DayLine, error)
FindRange 获取某时间点前后limit条数据
func (*DayLineService) GetDayLine ¶
func (svc *DayLineService) GetDayLine(secId string, beg int, end int, limit int, previous *entity.DayLine) ([]*entity.DayLine, error)
GetDayLine 获取某只股票的日线数据
func (*DayLineService) GetFinanceFlow ¶
func (svc *DayLineService) GetFinanceFlow(secId string, beg int, limit int) ([]*entity.DayLine, error)
GetFinanceFlow 获取某只股票的日线资金流动数据,最多6个月的数据
func (*DayLineService) GetKLine ¶
func (svc *DayLineService) GetKLine(secId string, beg int, end int, limit int, klt int) ([]string, error)
GetKLine 获取某只股票的分钟线到年线的数据
func (*DayLineService) GetSeqName ¶
func (svc *DayLineService) GetSeqName() string
func (*DayLineService) GetUpdateDayline ¶
func (svc *DayLineService) GetUpdateDayline(secId string, beg int64, limit int) ([]*entity.DayLine, error)
GetUpdateDayline 当天15点之前缺当天资金流数据
func (*DayLineService) NewEntities ¶
func (svc *DayLineService) NewEntities(data []byte) (interface{}, error)
func (*DayLineService) NewEntity ¶
func (svc *DayLineService) NewEntity(data []byte) (interface{}, error)
func (*DayLineService) ParseByte ¶
func (svc *DayLineService) ParseByte(shareId string, content []byte) []interface{}
func (*DayLineService) ParsePath ¶
func (svc *DayLineService) ParsePath(src string, target string) error
ParsePath 读目录下的数据
func (*DayLineService) RefreshBeforeMa ¶
func (svc *DayLineService) RefreshBeforeMa(startDate int64) error
RefreshBeforeMa 刷新所有股票的日线统计数据,包括移动平均,累计增长,均值,相对标准差
func (*DayLineService) RefreshDayLine ¶
func (svc *DayLineService) RefreshDayLine(beg int64) error
RefreshDayLine 刷新所有股票的日线数据,beg为负数的时候从已有的最新数据开始更新
func (*DayLineService) RefreshStat ¶
func (svc *DayLineService) RefreshStat(startDate int64) error
RefreshStat 刷新所有股票的日线统计数据,包括移动平均,累计增长,均值,相对标准差
func (*DayLineService) StdPath ¶
func (svc *DayLineService) StdPath(src string, minmax string, standard string, startDate int64, endDate int64) error
StdPath src: "C:\stock\data\origin\lday" minmax: "C:\stock\data\minmax\lday" standard: "C:\stock\data\standard\lday"
func (*DayLineService) UpdateBeforeMa ¶
func (svc *DayLineService) UpdateBeforeMa(tscode string, startDate int64) (int64, error)
UpdateBeforeMa 填充过去1,3,5天的各移动平均值
func (*DayLineService) UpdateDayline ¶
func (*DayLineService) UpdateFinanceFlow ¶
func (*DayLineService) UpdateStat ¶
func (svc *DayLineService) UpdateStat(tscode string, startDate int64) (int64, error)
func (*DayLineService) WriteAllFile ¶
func (svc *DayLineService) WriteAllFile(startDate int64) error
type ExpressResponse ¶
type ExpressResponse struct { SecurityCode string `json:"SECURITY_CODE"` SecurityNameAbbr string `json:"SECURITY_NAME_ABBR"` TradeMarketCode string `json:"TRADE_MARKET_CODE"` TradeMarket string `json:"TRADE_MARKET"` SecurityTypeCode string `json:"SECURITY_TYPE_CODE"` SecurityType string `json:"SECURITY_TYPE"` NewestDate string `json:"UPDATE_DATE"` ReportDate string `json:"REPORT_DATE"` BasicEps float64 `json:"BASIC_EPS"` //每股收益 DeductBasicEps float64 `json:"DEDUCT_BASIC_EPS"` //每股扣非收益 TotalOperateIncome float64 `json:"TOTAL_OPERATE_INCOME"` //营收 TotalOperateIncomeSq float64 `json:"TOTAL_OPERATE_INCOME_SQ"` //去年同期(元) ParentNetProfit float64 `json:"PARENT_NETPROFIT"` //归母净利润 ParentNetProfitSq float64 `json:"PARENT_NETPROFIT_SQ"` //去年同期(元) ParentBvps float64 `json:"PARENT_BVPS"` //每股净资产 WeightAvgRoe float64 `json:"WEIGHTAVG_ROE"` //净资产收益率 YoySales float64 `json:"YSTZ"` //收入同比增长 YoyNetProfit float64 `json:"JLRTBZCL"` //净利润同比增长 OrLastMonth float64 `json:"DJDYSHZ"` //收入季度环比增长 NpLastMonth float64 `json:"DJDJLHZ"` //利润季度环比增长 PublishName string `json:"PUBLISHNAME"` NoticeDate string `json:"NOTICE_DATE"` OrgCode string `json:"ORG_CODE"` Market string `json:"MARKET"` IsNew string `json:"ISNEW"` QDate string `json:"QDATE"` NDate string `json:"NDATE"` DataType string `json:"DATATYPE"` DataYear string `json:"DATAYEAR"` DateMmDd string `json:"DATEMMDD"` EITime string `json:"EITIME"` SecuCode string `json:"SECUCODE"` }
type ExpressResponseData ¶
type ExpressResponseData struct { eastmoney.ReportResponseData Data []*ExpressResponse `json:"data,omitempty"` }
type ExpressResponseResult ¶
type ExpressResponseResult struct { eastmoney.ReportResponseResult Result *ExpressResponseData `json:"result,omitempty"` }
type ExpressService ¶
type ExpressService struct {
service.OrmBaseService
}
* 同步表结构,服务继承基本服务的方法
func GetExpressService ¶
func GetExpressService() *ExpressService
func (*ExpressService) AsyncUpdateExpress ¶
func (this *ExpressService) AsyncUpdateExpress(para interface{})
func (*ExpressService) FindByQDate ¶
func (*ExpressService) FindLatest ¶
func (*ExpressService) GetSeqName ¶
func (this *ExpressService) GetSeqName() string
func (*ExpressService) GetUpdateExpress ¶
func (this *ExpressService) GetUpdateExpress(securityCode string) ([]interface{}, error)
func (*ExpressService) NewEntities ¶
func (this *ExpressService) NewEntities(data []byte) (interface{}, error)
func (*ExpressService) NewEntity ¶
func (this *ExpressService) NewEntity(data []byte) (interface{}, error)
func (*ExpressService) RefreshExpress ¶
func (this *ExpressService) RefreshExpress() error
func (*ExpressService) UpdateExpress ¶
func (this *ExpressService) UpdateExpress(securityCode string) ([]interface{}, error)
type FminLineService ¶
type FminLineService struct {
service.OrmBaseService
}
* 同步表结构,服务继承基本服务的方法
func GetFminLineService ¶
func GetFminLineService() *FminLineService
func (*FminLineService) AsyncParseFile ¶
func (this *FminLineService) AsyncParseFile(para interface{})
func (*FminLineService) GetSeqName ¶
func (this *FminLineService) GetSeqName() string
func (*FminLineService) NewEntities ¶
func (this *FminLineService) NewEntities(data []byte) (interface{}, error)
func (*FminLineService) NewEntity ¶
func (this *FminLineService) NewEntity(data []byte) (interface{}, error)
func (*FminLineService) ParseByte ¶
func (this *FminLineService) ParseByte(shareId string, content []byte) []*entity.FminLine
type ForecastRequestParam ¶
type ForecastRequestParam struct { Callback string `json:"callback"` SortColumns string `json:"sortColumns"` //排序的字段,逗号分隔 SortTypes string `json:"sortTypes"` //-1降序,1升序,逗号分隔 PageSize string `json:"pageSize"` //每页的记录数 PageNumber int `json:"pageNumber"` //页数 ReportName string `json:"reportName"` //获取的数据类型 Columns string `json:"columns"` //获取的字段,ALL Token string `json:"token"` Filter string `json:"filter,omitempty"` //条件 }
type ForecastResponse ¶
type ForecastResponse struct { SecuCode string `json:"SECUCODE"` SecurityCode string `json:"SECURITY_CODE"` SecurityNameAbbr string `json:"SECURITY_NAME_ABBR"` TradeMarketCode string `json:"TRADE_MARKET_CODE"` TradeMarket string `json:"TRADE_MARKET"` SecurityTypeCode string `json:"SECURITY_TYPE_CODE"` SecurityType string `json:"SECURITY_TYPE"` NoticeDate string `json:"NOTICE_DATE"` OrgCode string `json:"ORG_CODE"` ReportDate string `json:"REPORT_DATE"` QDate string `json:"QDATE"` NDate string `json:"NDATE"` PredictFinanceCode string `json:"PREDICT_FINANCE_CODE"` PredictFinance string `xorm:"varchar(1024)" json:"PREDICT_FINANCE"` PredictAmtLower float64 `json:"PREDICT_AMT_LOWER"` PredictAmtUpper float64 `json:"PREDICT_AMT_UPPER"` AddAmpLower float64 `json:"ADD_AMP_LOWER"` AddAmpUpper float64 `json:"ADD_AMP_UPPER"` PredictContent string `xorm:"varchar(32000)" json:"PREDICT_CONTENT"` ChangeReasonExplain string `xorm:"varchar(32000)" json:"CHANGE_REASON_EXPLAIN"` PredictType string `json:"PREDICT_TYPE"` PreYearSamePeriod float64 `json:"PREYEAR_SAME_PERIOD"` IncreaseAvg float64 `json:"INCREASE_JZ"` ForecastAvg float64 `json:"FORECAST_JZ"` ForecastState string `json:"FORECAST_STATE"` IsLatest string `json:"IS_LATEST"` }
type ForecastResponseData ¶
type ForecastResponseData struct { eastmoney.ReportResponseData Data []*ForecastResponse `json:"data,omitempty"` }
type ForecastResponseResult ¶
type ForecastResponseResult struct { eastmoney.ReportResponseResult Result *ForecastResponseData `json:"result,omitempty"` }
type ForecastService ¶
type ForecastService struct {
service.OrmBaseService
}
* 同步表结构,服务继承基本服务的方法
func GetForecastService ¶
func GetForecastService() *ForecastService
func (*ForecastService) AsyncUpdateForecast ¶
func (this *ForecastService) AsyncUpdateForecast(para interface{})
func (*ForecastService) FindByQDate ¶
func (*ForecastService) FindLatest ¶
func (*ForecastService) GetSeqName ¶
func (this *ForecastService) GetSeqName() string
func (*ForecastService) GetUpdateForecast ¶
func (this *ForecastService) GetUpdateForecast(securityCode string) ([]interface{}, error)
func (*ForecastService) NewEntities ¶
func (this *ForecastService) NewEntities(data []byte) (interface{}, error)
func (*ForecastService) NewEntity ¶
func (this *ForecastService) NewEntity(data []byte) (interface{}, error)
func (*ForecastService) RefreshForecast ¶
func (this *ForecastService) RefreshForecast() error
func (*ForecastService) UpdateForecast ¶
func (this *ForecastService) UpdateForecast(securityCode string) ([]interface{}, error)
type InOutPoint ¶
type IncomeService ¶
type IncomeService struct {
service.OrmBaseService
}
* 同步表结构,服务继承基本服务的方法
func GetIncomeService ¶
func GetIncomeService() *IncomeService
func (*IncomeService) GetSeqName ¶
func (this *IncomeService) GetSeqName() string
func (*IncomeService) NewEntities ¶
func (this *IncomeService) NewEntities(data []byte) (interface{}, error)
func (*IncomeService) NewEntity ¶
func (this *IncomeService) NewEntity(data []byte) (interface{}, error)
type MinLineService ¶
type MinLineService struct {
service.OrmBaseService
}
MinLineService 同步表结构,服务继承基本服务的方法
func GetMinLineService ¶
func GetMinLineService() *MinLineService
func (*MinLineService) AsyncParseFile ¶
func (svc *MinLineService) AsyncParseFile(para interface{})
func (*MinLineService) AsyncUpdateMinLine ¶
func (svc *MinLineService) AsyncUpdateMinLine(para interface{})
func (*MinLineService) AsyncUpdateTodayMinLine ¶
func (svc *MinLineService) AsyncUpdateTodayMinLine(para interface{})
func (*MinLineService) Cron ¶
func (svc *MinLineService) Cron() *cron.Cron
func (*MinLineService) FindMinLines ¶
func (svc *MinLineService) FindMinLines(tscode string, tradeDate int64, tradeMinute int64) ([]*entity.MinLine, error)
FindMinLines 除非当天的分钟数据全部获取,每次访问都要重新获取网络的分钟数据
func (*MinLineService) GetMinLine ¶
func (svc *MinLineService) GetMinLine(secId string, beg int, limit int, klt int) ([]*entity.MinLine, error)
GetMinLine 获取过去的分钟数据
func (*MinLineService) GetSeqName ¶
func (svc *MinLineService) GetSeqName() string
func (*MinLineService) GetTodayFinanceFlow ¶
func (svc *MinLineService) GetTodayFinanceFlow(secId string) ([]*entity.MinLine, error)
GetTodayFinanceFlow 获取当日的资金流向分钟数据
func (*MinLineService) GetTodayMinLine ¶
func (svc *MinLineService) GetTodayMinLine(secId string) ([]*entity.MinLine, error)
GetTodayMinLine 获取当日的分钟数据
func (*MinLineService) GetUpdateMinLine ¶
func (*MinLineService) GetUpdateTodayMinLine ¶
func (svc *MinLineService) GetUpdateTodayMinLine(secId string) ([]*entity.MinLine, error)
func (*MinLineService) NewEntities ¶
func (svc *MinLineService) NewEntities(data []byte) (interface{}, error)
func (*MinLineService) NewEntity ¶
func (svc *MinLineService) NewEntity(data []byte) (interface{}, error)
func (*MinLineService) ParseByte ¶
func (svc *MinLineService) ParseByte(shareId string, content []byte) []*entity.MinLine
func (*MinLineService) ParsePath ¶
func (svc *MinLineService) ParsePath(src string, target string) error
* 读目录下的数据
func (*MinLineService) RefreshMinLine ¶
func (svc *MinLineService) RefreshMinLine(beg int64) error
func (*MinLineService) RefreshToday ¶
func (svc *MinLineService) RefreshToday()
func (*MinLineService) RefreshTodayMinLine ¶
func (svc *MinLineService) RefreshTodayMinLine() error
func (*MinLineService) UpdateMinLine ¶
func (*MinLineService) UpdateTodayFinanceFlow ¶
func (*MinLineService) UpdateTodayMinLine ¶
func (svc *MinLineService) UpdateTodayMinLine(secId string) ([]*entity.MinLine, error)
UpdateTodayMinLine 获取今天的分钟数据,并更新数据库
type PerformanceResponse ¶
type PerformanceResponse struct { SecurityCode string `json:"SECURITY_CODE"` SecurityNameAbbr string `json:"SECURITY_NAME_ABBR"` TradeMarketCode string `json:"TRADE_MARKET_CODE"` TradeMarket string `json:"TRADE_MARKET"` SecurityTypeCode string `json:"SECURITY_TYPE_CODE"` SecurityType string `json:"SECURITY_TYPE"` NewestDate string `json:"UPDATE_DATE"` ReportDate string `json:"REPORTDATE"` BasicEps float64 `json:"BASIC_EPS"` //每股收益 DeductBasicEps float64 `json:"DEDUCT_BASIC_EPS"` //每股扣非收益 TotalOperateIncome float64 `json:"TOTAL_OPERATE_INCOME"` //营收 ParentNetProfit float64 `json:"PARENT_NETPROFIT"` //归母净利润 WeightAvgRoe float64 `json:"WEIGHTAVG_ROE"` //净资产收益率 YoySales float64 `json:"YSTZ"` //应收同比增长 YoyDeduNp float64 `json:"SJLTZ"` //扣非净利润同比增长 Bps float64 `json:"BPS"` //每股净资产 Cfps float64 `json:"MGJYXJJE"` //每股经营现金流量(元) GrossprofitMargin float64 `json:"XSMLL"` //销售毛利率(%) OrLastMonth float64 `json:"YSHZ"` //营业收入季度环比增长(%) NpLastMonth float64 `json:"SJLHZ"` //净利润季度环比增长(%) AssignDscrpt string `json:"ASSIGNDSCRPT"` PayYear string `json:"PAYYEAR"` PublishName string `json:"PUBLISHNAME"` DividendYieldRatio float64 `json:"ZXGXL"` //股息率 NoticeDate string `json:"NOTICE_DATE"` OrgCode string `json:"ORG_CODE"` TradeMarketZJG string `json:"TRADE_MARKET_ZJG"` IsNew string `json:"ISNEW"` QDate string `json:"QDATE"` NDate string `json:"NDATE"` DataType string `json:"DATATYPE"` DataYear string `json:"DATAYEAR"` DateMmDd string `json:"DATEMMDD"` EITime string `json:"EITIME"` SecuCode string `json:"SECUCODE"` }
type PerformanceResponseData ¶
type PerformanceResponseData struct { eastmoney.ReportResponseData Data []*PerformanceResponse `json:"data,omitempty"` }
type PerformanceResponseResult ¶
type PerformanceResponseResult struct { eastmoney.ReportResponseResult Result *PerformanceResponseData `json:"result,omitempty"` }
type PerformanceService ¶
type PerformanceService struct {
service.OrmBaseService
}
PerformanceService 同步表结构,服务继承基本服务的方法
func GetPerformanceService ¶
func GetPerformanceService() *PerformanceService
func (*PerformanceService) AsyncUpdatePerformance ¶
func (svc *PerformanceService) AsyncUpdatePerformance(para interface{})
func (*PerformanceService) FindByQDate ¶
func (*PerformanceService) FindLatest ¶
func (*PerformanceService) GetSeqName ¶
func (svc *PerformanceService) GetSeqName() string
func (*PerformanceService) GetUpdatePerformance ¶
func (svc *PerformanceService) GetUpdatePerformance(securityCode string) ([]interface{}, error)
func (*PerformanceService) NewEntities ¶
func (svc *PerformanceService) NewEntities(data []byte) (interface{}, error)
func (*PerformanceService) NewEntity ¶
func (svc *PerformanceService) NewEntity(data []byte) (interface{}, error)
func (*PerformanceService) RefreshPerformance ¶
func (svc *PerformanceService) RefreshPerformance() error
func (*PerformanceService) UpdatePerformance ¶
func (svc *PerformanceService) UpdatePerformance(securityCode string) ([]interface{}, error)
type PerformanceType ¶
type PerformanceType int64
type PinYinService ¶
type PinYinService struct {
service.OrmBaseService
}
* 同步表结构,服务继承基本服务的方法
func GetPinYinService ¶
func GetPinYinService() *PinYinService
func (*PinYinService) GetSeqName ¶
func (this *PinYinService) GetSeqName() string
func (*PinYinService) NewEntities ¶
func (this *PinYinService) NewEntities(data []byte) (interface{}, error)
func (*PinYinService) NewEntity ¶
func (this *PinYinService) NewEntity(data []byte) (interface{}, error)
type PortfolioStatService ¶
type PortfolioStatService struct {
service.OrmBaseService
}
func GetPortfolioStatService ¶
func GetPortfolioStatService() *PortfolioStatService
func (*PortfolioStatService) AsyncUpdatePortfolioStat ¶
func (this *PortfolioStatService) AsyncUpdatePortfolioStat(para interface{})
func (*PortfolioStatService) FindPortfolioStat ¶
func (*PortfolioStatService) GetSeqName ¶
func (this *PortfolioStatService) GetSeqName() string
func (*PortfolioStatService) GetUpdatePortfolioStat ¶
func (this *PortfolioStatService) GetUpdatePortfolioStat(tscode string) ([]interface{}, error)
* 更新股票季度业绩统计数据,并返回结果
func (*PortfolioStatService) NewEntities ¶
func (this *PortfolioStatService) NewEntities(data []byte) (interface{}, error)
func (*PortfolioStatService) NewEntity ¶
func (this *PortfolioStatService) NewEntity(data []byte) (interface{}, error)
func (*PortfolioStatService) RefreshPortfolioStat ¶
func (this *PortfolioStatService) RefreshPortfolioStat() error
* 刷新所有股票的季度业绩统计数据
func (*PortfolioStatService) UpdatePortfolioStat ¶
func (this *PortfolioStatService) UpdatePortfolioStat(tscode string) error
* 通过内存更新股票季度业绩统计数据,并返回结果
type ProcessLogService ¶
type ProcessLogService struct {
service.OrmBaseService
}
func GetProcessLogService ¶
func GetProcessLogService() *ProcessLogService
func (*ProcessLogService) Cron ¶
func (this *ProcessLogService) Cron() *cron.Cron
func (*ProcessLogService) EndLog ¶
func (this *ProcessLogService) EndLog(processLog *entity.ProcessLog, errorCode string, errorMsg string)
func (*ProcessLogService) GetSeqName ¶
func (this *ProcessLogService) GetSeqName() string
func (*ProcessLogService) NewEntities ¶
func (this *ProcessLogService) NewEntities(data []byte) (interface{}, error)
func (*ProcessLogService) NewEntity ¶
func (this *ProcessLogService) NewEntity(data []byte) (interface{}, error)
func (*ProcessLogService) Schedule ¶
func (this *ProcessLogService) Schedule()
func (*ProcessLogService) StartLog ¶
func (this *ProcessLogService) StartLog(name string, methodName string, bizCode string) *entity.ProcessLog
type QPerformanceService ¶
type QPerformanceService struct {
service.OrmBaseService
}
func GetQPerformanceService ¶
func GetQPerformanceService() *QPerformanceService
func (*QPerformanceService) AsyncUpdateDayQPerformance ¶
func (svc *QPerformanceService) AsyncUpdateDayQPerformance(para interface{})
func (*QPerformanceService) AsyncUpdateWmqyQPerformance ¶
func (svc *QPerformanceService) AsyncUpdateWmqyQPerformance(para interface{})
func (*QPerformanceService) Compute ¶
func (svc *QPerformanceService) Compute(qpMap map[string][]interface{}, previousMap map[string]*entity.QPerformance)
Compute 计算并推导缺失的当前价格和股票季度业绩数据项
func (*QPerformanceService) FindAccBySql ¶
func (svc *QPerformanceService) FindAccBySql(tsCode string, startDate string) (map[string][]interface{}, error)
FindAccBySql 通过数据库sql计算累计涨幅
func (*QPerformanceService) FindAllQStatBySql ¶
func (svc *QPerformanceService) FindAllQStatBySql(tsCode string, startDate string, endDate string) map[string][]interface{}
FindAllQStatBySql 通过数据库sql计算股票季度业绩全部统计数据,并返回结果
func (*QPerformanceService) FindByQDate ¶ added in v0.1.24
func (*QPerformanceService) FindPercentRank ¶
func (svc *QPerformanceService) FindPercentRank(rankType string, tsCode string, tradeDate int64, startDate string, endDate string, from int, limit int, count int64) ([]*entity.QPerformance, error)
FindPercentRank 计算股票的在本股票历史上以及在同行业历史上的位置,不支持tscode多只股票
func (*QPerformanceService) FindQExpress ¶
func (svc *QPerformanceService) FindQExpress(lineType LineType, tsCode string, startDate string, endDate string) (map[string][]interface{}, error)
FindQExpress 组合当前价格和股票季度业绩快报数据
func (*QPerformanceService) FindQForecast ¶
func (svc *QPerformanceService) FindQForecast(lineType LineType, tsCode string, startDate string, endDate string) (map[string][]interface{}, error)
FindQForecast 组合当前价格和股票季度业绩预测数据
func (*QPerformanceService) FindQPerformance ¶
func (svc *QPerformanceService) FindQPerformance(lineType LineType, tsCode string, startDate string, endDate string) (map[string][]interface{}, error)
FindQPerformance 组合当前价格和股票季度正式业绩数据
func (*QPerformanceService) FindQStatBySql ¶
func (svc *QPerformanceService) FindQStatBySql(aggregationType string, tsCode string, startDate string, endDate string, sourceName string) (map[string][]interface{}, error)
FindQStatBySql 通过数据库sql计算股票季度业绩某种统计数据,并返回结果
func (*QPerformanceService) FindStdQPerformance ¶
func (svc *QPerformanceService) FindStdQPerformance(tsCode string, terms []int, startDate string, endDate string, stdType StdType, isWinsorize bool) (map[string][]*entity.QPerformance, error)
FindStdQPerformance 查询股票季度业绩数据,并进行标准化处理
func (*QPerformanceService) GetQTerm ¶
func (svc *QPerformanceService) GetQTerm(qpMap map[string][]*entity.QPerformance, terms []int) (map[string]map[int]*QTerm, error)
GetQTerm 在所有的数据中分选出各种不同的term对应的数据集,原始数据降序排列
func (*QPerformanceService) GetQTermBySql ¶
func (svc *QPerformanceService) GetQTermBySql(tscode string, term int) (*QTerm, error)
func (*QPerformanceService) GetSeqName ¶
func (svc *QPerformanceService) GetSeqName() string
func (*QPerformanceService) GetUpdateDayQPerformance ¶
func (svc *QPerformanceService) GetUpdateDayQPerformance(tscode string) ([]interface{}, error)
func (*QPerformanceService) GetUpdateWmqyQPerformance ¶
func (svc *QPerformanceService) GetUpdateWmqyQPerformance(tscode string, startDate string) ([]interface{}, error)
GetUpdateWmqyQPerformance 更新股票季度业绩数据,并返回结果
func (*QPerformanceService) NewEntities ¶
func (svc *QPerformanceService) NewEntities(data []byte) (interface{}, error)
func (*QPerformanceService) NewEntity ¶
func (svc *QPerformanceService) NewEntity(data []byte) (interface{}, error)
func (*QPerformanceService) RefreshDayQPerformance ¶
func (svc *QPerformanceService) RefreshDayQPerformance() error
func (*QPerformanceService) RefreshWmqyQPerformance ¶
func (svc *QPerformanceService) RefreshWmqyQPerformance(startDate string) error
RefreshWmqyQPerformance 刷新所有股票的季度业绩数据
func (*QPerformanceService) Std ¶
func (svc *QPerformanceService) Std(ps []interface{}, stdType StdType, isWinsorize bool) []*entity.QPerformance
Std 对股票季度业绩数据进行异常值处理和标准化操作
func (*QPerformanceService) StdMap ¶
func (svc *QPerformanceService) StdMap(psMap map[string][]interface{}, stdType StdType, isWinsorize bool) map[string][]*entity.QPerformance
StdMap 批量标准化股票季度业绩数据
type QStatService ¶
type QStatService struct { service.OrmBaseService Terms []int MedianMap map[string]*entity.QStat Locker sync.Mutex }
func GetQStatService ¶
func GetQStatService() *QStatService
func (*QStatService) AsyncUpdateQStat ¶
func (svc *QStatService) AsyncUpdateQStat(para interface{})
func (*QStatService) FindAcc ¶
func (svc *QStatService) FindAcc(ps []interface{}, qterm *QTerm, pre *entity.QPerformance) *entity.QStat
FindAcc 原始数据降序排列
func (*QStatService) FindAllQStat ¶
func (svc *QStatService) FindAllQStat(qpMap map[string][]*entity.QPerformance, qtermMap map[string]map[int]*QTerm) map[string][]interface{}
FindAllQStat 通过内存计算股票季度业绩全部统计数据,并返回结果,原始数据降序排列
func (*QStatService) FindPercentRank ¶
func (*QStatService) FindQStat ¶
func (svc *QStatService) FindQStat(tsCode string, terms []int, source string, sourceName string) (map[string]map[int][]interface{}, error)
FindQStat 查询股票季度业绩统计数据
func (*QStatService) FindQStatBy ¶ added in v0.1.24
func (svc *QStatService) FindQStatBy(tsCode string, terms []int, source []string, orderby string, from int, limit int, count int64) ([]*entity.QStat, int64, error)
FindQStatBy 查询股票季度业绩统计数据
func (*QStatService) FindQStatMedian ¶
func (svc *QStatService) FindQStatMedian() (map[string]*entity.QStat, error)
FindQStatMedian 计算股票季度业绩统计数据中位数,最大值和最小值,并返回结果,方便进行去极值和标准化
func (*QStatService) GetQStatMedian ¶
func (svc *QStatService) GetQStatMedian() error
GetQStatMedian 计算股票所有统计数据的Min,Max,并保存
func (*QStatService) GetSeqName ¶
func (svc *QStatService) GetSeqName() string
func (*QStatService) GetUpdateQStat ¶
func (svc *QStatService) GetUpdateQStat(tscode string) ([]interface{}, error)
GetUpdateQStat 更新股票季度业绩统计数据,并返回结果
func (*QStatService) MinmaxStd ¶
func (svc *QStatService) MinmaxStd(q *entity.QStat, fieldname string) float64
MinmaxStd 对某个统计指标计算minmax标准化
func (*QStatService) NewEntities ¶
func (svc *QStatService) NewEntities(data []byte) (interface{}, error)
func (*QStatService) NewEntity ¶
func (svc *QStatService) NewEntity(data []byte) (interface{}, error)
func (*QStatService) RefreshQStat ¶
func (svc *QStatService) RefreshQStat() error
RefreshQStat 刷新所有股票的季度业绩统计数据
func (*QStatService) UpdatePercentRank ¶
func (*QStatService) UpdateQStat ¶
func (svc *QStatService) UpdateQStat(tscode string, terms []int) ([]interface{}, error)
UpdateQStat 通过内存更新股票季度业绩统计数据,并返回结果
func (*QStatService) UpdateQStatBySql ¶
func (svc *QStatService) UpdateQStatBySql(tscode string, term int) ([]interface{}, error)
UpdateQStatBySql 通过数据库sql更新股票季度业绩统计数据,并返回结果
type ShareEventService ¶
type ShareEventService struct {
}ShareEventService 同步表结构,服务继承基本服务的方法
func GetShareEventService ¶
func GetShareEventService() *ShareEventService
func (*ShareEventService) GetMine ¶
func (svc *ShareEventService) GetMine(userName string, tsCode string) ([]interface{}, error)
func (*ShareEventService) GetSeqName ¶
func (svc *ShareEventService) GetSeqName() string
func (*ShareEventService) NewEntities ¶
func (svc *ShareEventService) NewEntities(data []byte) (interface{}, error)
func (*ShareEventService) NewEntity ¶
func (svc *ShareEventService) NewEntity(data []byte) (interface{}, error)
type ShareRequest ¶
type ShareRequest struct {}
type ShareService ¶
type ShareService struct {
}ShareService 同步表结构,服务继承基本服务的方法
func GetShareService ¶
func GetShareService() *ShareService
func (*ShareService) GetCacheShare ¶
func (svc *ShareService) GetCacheShare() ([]string, map[string]*entity.Share)
GetCacheShare 获取缓存的股票
func (*ShareService) GetSeqName ¶
func (svc *ShareService) GetSeqName() string
func (*ShareService) GetShares ¶
func (svc *ShareService) GetShares(tsCode string) ([]interface{}, error)
func (*ShareService) NewEntities ¶
func (svc *ShareService) NewEntities(data []byte) (interface{}, error)
func (*ShareService) NewEntity ¶
func (svc *ShareService) NewEntity(data []byte) (interface{}, error)
func (*ShareService) RefreshCacheShare ¶
func (svc *ShareService) RefreshCacheShare()
func (*ShareService) UpdatePinYin ¶
func (svc *ShareService) UpdatePinYin()
func (*ShareService) UpdateSector ¶
func (svc *ShareService) UpdateSector(tsCode string, sector string)
func (*ShareService) UpdateShares ¶
func (svc *ShareService) UpdateShares()
type StatScoreService ¶
type StatScoreService struct {
service.OrmBaseService
}
func GetStatScoreService ¶
func GetStatScoreService() *StatScoreService
func (*StatScoreService) AsyncUpdateStatScore ¶
func (svc *StatScoreService) AsyncUpdateStatScore(para interface{})
func (*StatScoreService) CreateScorePercentile ¶
func (svc *StatScoreService) CreateScorePercentile() (int64, error)
CreateScorePercentile 计算股票季度业绩统计评分数据中位数,最大值和最小值,并返回结果,方便进行去极值和标准化
func (*StatScoreService) FindStatScoreMedian ¶
func (svc *StatScoreService) FindStatScoreMedian() (map[string]*entity.StatScore, error)
FindStatScoreMedian 计算股票季度业绩统计数据中位数,最大值和最小值,并返回结果,方便进行去极值和标准化
func (*StatScoreService) GetSeqName ¶
func (svc *StatScoreService) GetSeqName() string
func (*StatScoreService) GetUpdateStatScore ¶
func (*StatScoreService) NewEntities ¶
func (svc *StatScoreService) NewEntities(data []byte) (interface{}, error)
func (*StatScoreService) NewEntity ¶
func (svc *StatScoreService) NewEntity(data []byte) (interface{}, error)
func (*StatScoreService) RefreshStatScore ¶
func (svc *StatScoreService) RefreshStatScore() error
RefreshStatScore 刷新所有股票的季度业绩统计评分数据
type TodayMinLineResponseData ¶
type TodayMinLineResponseData struct { Code string `json:"code,omitempty"` Market int `json:"market,omitempty"` Name string `json:"name,omitempty"` Decimal int `json:"decimal,omitempty"` //小数位 TrendsTotal int `json:"trendsTotal,omitempty"` //总记录数 PrePrice float64 `json:"prePrice,omitempty"` PreClose float64 `json:"preClose,omitempty"` Trends []string `json:"trends,omitempty"` //数据 }
type WmqyLineBuf ¶
type WmqyLineService ¶
type WmqyLineService struct {
service.OrmBaseService
}
WmqyLineService 同步表结构,服务继承基本服务的方法
func GetWmqyLineService ¶
func GetWmqyLineService() *WmqyLineService
func (*WmqyLineService) AsyncStdFile ¶
func (svc *WmqyLineService) AsyncStdFile(para interface{})
func (*WmqyLineService) AsyncUpdateWmqyLine ¶
func (svc *WmqyLineService) AsyncUpdateWmqyLine(para interface{})
func (*WmqyLineService) FindFollowing ¶
func (svc *WmqyLineService) FindFollowing(tsCode string, lineType int, startDate string, endDate string, from int, limit int, count int64) ([]*entity.WmqyLine, int64, error)
FindFollowing 获取某时间点后limit条数据,如果没有日期范围的指定,就是返回最早limit条数据
func (*WmqyLineService) FindPreceding ¶
func (svc *WmqyLineService) FindPreceding(tsCode string, lineType int, endDate string, from int, limit int, count int64) ([]*entity.WmqyLine, int64, error)
FindPreceding 获取某时间点前limit条数据,如果没有日期范围的指定,就是返回最新的回溯limit条数据
func (*WmqyLineService) GetSeqName ¶
func (svc *WmqyLineService) GetSeqName() string
func (*WmqyLineService) GetUpdateWmqyLine ¶
func (svc *WmqyLineService) GetUpdateWmqyLine(secId string, beg int64, limit int, wmqy *WmqyLineBuf) ([]interface{}, error)
func (*WmqyLineService) GetWmqyLine ¶
func (svc *WmqyLineService) GetWmqyLine(secId string, beg int64, end int, limit int, klt int, previous *entity.WmqyLine) ([]*entity.WmqyLine, error)
* 获取某只股票的日线数据
func (*WmqyLineService) NewEntities ¶
func (svc *WmqyLineService) NewEntities(data []byte) (interface{}, error)
func (*WmqyLineService) NewEntity ¶
func (svc *WmqyLineService) NewEntity(data []byte) (interface{}, error)
func (*WmqyLineService) RefreshWmqyLine ¶
func (svc *WmqyLineService) RefreshWmqyLine(beg int64) error
* 刷新所有股票的日线数据,beg为负数的时候从已有的最新数据开始更新
func (*WmqyLineService) StdFile ¶
func (svc *WmqyLineService) StdFile(minmax string, standard string, _startDate int64, _endDate int64, filename string) (map[stock.AggregationType]*entity.QPerformance, error)
func (*WmqyLineService) StdPath ¶
func (svc *WmqyLineService) StdPath(minmax string, standard string, startDate int64, endDate int64) error
* minmax: "C:\stock\data\minmax\lday" standard: "C:\stock\data\standard\lday"
func (*WmqyLineService) UpdateWmqyLine ¶
func (svc *WmqyLineService) UpdateWmqyLine(secId string, beg int64, limit int, wmqy *WmqyLineBuf) ([]interface{}, error)
Source Files ¶
- balancesheet.go
- cashflow.go
- dayline.go
- dayline_eastmoney.go
- dayline_inout.go
- dayline_model.go
- default.go
- express.go
- express_eastmoney.go
- fminline.go
- forecast.go
- forecast_eastmoney.go
- income.go
- minline.go
- minline_eastmoney.go
- model.go
- performance.go
- performance_eastmoney.go
- pinyin.go
- portfoliostat.go
- processlog.go
- qperformance.go
- qstat.go
- share.go
- shareevent.go
- statscore.go
- wmqyline.go
- wmqyline_eastmoney.go