Documentation ¶
Index ¶
- Constants
- Variables
- func AnalyseAuction(index int, result map[string][]float64)
- func AnalyseAuctionAll()
- func BatchCallAuction(codes []string, index int) error
- func BatchRealtime(codes []string) error
- func BlockList() pandas.DataFrame
- func CallAuctionFilename(index int) string
- func FinanceInfo(securityCode string) (*quotes.FinanceInfo, error)
- func GetAnalyseAuctionResult() map[string][]float64
- func GetCacheKLine(code string, argv ...bool) pandas.DataFrame
- func GetCacheXdxr(code string) pandas.DataFrame
- func GetF10List() pandas.DataFrame
- func GetKLineAll(securityCode string, argv ...int) pandas.DataFrame
- func GetMinMax(input []float64) (float64, float64, error)
- func GetMinuteHistory(code, date string) *quotes.HistoryMinuteTimeReply
- func GetSecurityList() pandas.DataFrame
- func GetStockName(symbol string) (string, bool)
- func GetTickAll(code string) (vol float64)
- func GetTickData(securityCode string, date string) pandas.DataFrame
- func GetXdxrInfo(code string) pandas.DataFrame
- func GetZxgList() []string
- func InflowCount(df pandas.DataFrame, securityCode string) (summary cache.TurnoverDataSummary)
- func LeastSquares(x []float64, y []float64) (slope float64, intercept float64)
- func QuantityRelativeRatio(code string) float64
- func WriteCSVAppend(out any, last pandas.DataFrame) error
- type CallAuctionFeature
- type QuoteSnapshot
Constants ¶
View Source
const ( BlockPath = "/T0002/blocknew" ZxgBlk = "zxg.blk" BkltBlk = "BKLT.blk" ZdBk = "ZDBK.blk" )
Variables ¶
View Source
var ( FBarsCallAuctionFields = []string{"code", "strategy", "BSumVol", "ASumVol", "close", "date", "bid1", "ask1", "bidVol1", "askVol1", "bid2", "ask2", "bidVol2", "askVol2", "bid3", "ask3", "bidVol3", "askVol3", "bid4", "ask4", "bidVol4", "askVol4", "bid5", "ask5", "bidVol5", "askVol5"} FBarsCallAuctionFieldsSum = []string{"code", "aprice", "amax", "amin", "pprice", "pmax", "pmin"} )
View Source
var ( FBarsRaw = []string{"Open", "Close", "High", "Low", "Vol", "Amount", "DateTime", "UpCount", "DownCount"} FBarsRename = []string{"open", "close", "high", "low", "volume", "amount", "date", "up", "down"} FBarsHelfFields = []string{"date", "open", "close", "high", "low", "volume", "amount", "up", "down", "open_volume", "open_turnz", "open_unmatched", "close_volume", "close_turnz", "close_unmatched", "inner_volume", "outer_volume", "inner_amount", "outer_amount"} FBarsFields = []string{"date", "open", "close", "high", "low", "volume", "amount", "up", "down", "last_close", "turnover_rate", "open_volume", "open_turnz", "open_unmatched", "close_volume", "close_turnz", "close_unmatched", "inner_volume", "outer_volume", "inner_amount", "outer_amount"} FBarsFields1 = []string{"date", "open", "close", "high", "low", "volume", "amount", "up", "down", "last_close", "turnover_rate", "open_volume", "open_turnz", "open_unmatched", "close_volume", "close_turnz", "close_unmatched", "inner_volume", "outer_volume", "inner_amount", "outer_amount", "l5", "h10"} )
View Source
var (
// DataDaysDiff 日期差异偏移量
DataDaysDiff = 1
)
Functions ¶
func AnalyseAuction ¶ added in v1.5.18
func AnalyseAuctionAll ¶ added in v1.5.18
func AnalyseAuctionAll()
func BatchCallAuction ¶ added in v1.5.4
BatchCallAuction 批量获取集合竞价数据
func CallAuctionFilename ¶ added in v1.5.4
CallAuctionFilename 集合竞价数据缓存路径
func FinanceInfo ¶
func FinanceInfo(securityCode string) (*quotes.FinanceInfo, error)
FinanceInfo 个股基本信息
func GetAnalyseAuctionResult ¶ added in v1.5.18
func GetCacheXdxr ¶
func GetKLineAll ¶
GetKLineAll 获取日K线
func GetMinuteHistory ¶
func GetMinuteHistory(code, date string) *quotes.HistoryMinuteTimeReply
GetMinuteHistory 获得指定日期的分时数据
func GetTickData ¶
GetTickData 获取指定日期的分笔成交记录
func GetZxgList ¶
func GetZxgList() []string
func InflowCount ¶
func InflowCount(df pandas.DataFrame, securityCode string) (summary cache.TurnoverDataSummary)
InflowCount 统计内外盘
func LeastSquares ¶ added in v1.5.4
func QuantityRelativeRatio ¶
QuantityRelativeRatio 获得指定日期的分时数据
量比是衡量相对成交量的指标。 它是指股市开市后平均每分钟的成交量与过去5个交易日(不包含当日)平均每分钟成交量之比。 其计算公式为:量比=(现成交总手数 / 现累计开市时间(分) )/ 过去5日平均每分钟成交量
Types ¶
type CallAuctionFeature ¶ added in v1.5.4
type CallAuctionFeature struct { Code string `json:"Code" array:"0" name:"代码" dataframe:"code,string"` // 代码 Strategy string `json:"Strategy" array:"1" name:"策略" dataframe:"strategy,string"` BSumVol int64 `json:"BSumVol" array:"2" name:"委买价求和" dataframe:"bSumVol,int64"` //委买价求和1+2+3+4+5 ASumVol int64 `json:"ASumVol" array:"3" name:"委卖价求和" dataframe:"aSumVol,int64"` //委卖价求和1+2+3+4+5 Close float64 `json:"Close" array:"4" name:"收盘" dataframe:"close,float64"` Date string `json:"Date" array:"5" name:"日期" dataframe:"date,string"` Bid1 float64 `json:"Bid1" array:"6" name:"委买价1" dataframe:"bid1,float64"` //委买价1 Ask1 float64 `json:"Ask1" array:"7" name:"委卖价1" dataframe:"ask1,float64"` //委卖价1 BidVol1 int64 `json:"BidVol1" array:"8" name:"委买量1" dataframe:"bidVol1,int64"` //委买量1 AskVol1 int64 `json:"AskVol1" array:"9" name:"委卖量1" dataframe:"askVol1,int64"` //委卖量1 Bid2 float64 `json:"Bid2" array:"10" name:"委买价2" dataframe:"bid2,float64"` //委买价2 Ask2 float64 `json:"Ask2" array:"11" name:"委卖价2" dataframe:"ask2,float64"` //委卖价2 BidVol2 int64 `json:"BidVol2" array:"12" name:"委买量2" dataframe:"bidVol2,int64"` //委买量2 AskVol2 int64 `json:"AskVol2" array:"13" name:"委卖量2" dataframe:"askVol2,int64"` //委卖量2 Bid3 float64 `json:"Bid3" array:"14" name:"委买价3" dataframe:"bid3,float64"` //委买价3 Ask3 float64 `json:"Ask3" array:"15" name:"委卖价3" dataframe:"ask3,float64"` //委卖价3 BidVol3 int64 `json:"BidVol3" array:"16" name:"委买量3" dataframe:"bidVol3,int64"` //委买量3 AskVol3 int64 `json:"AskVol3" array:"17" name:"委卖量3" dataframe:"askVol3,int64"` //委卖量3 Bid4 float64 `json:"Bid4" array:"18" name:"委买价4" dataframe:"bid4,float64"` // 委买价4 Ask4 float64 `json:"Ask4" array:"19" name:"委卖价4" dataframe:"ask4,float64"` // 委卖价4 BidVol4 int64 `json:"BidVol4" array:"20" name:"委买量4" dataframe:"bidVol4,int64"` //委买量4 AskVol4 int64 `json:"AskVol4" array:"21" name:"委卖量4" dataframe:"askVol4,int64"` //委卖量4 Bid5 float64 `json:"Bid5" array:"22" name:"委买价5" dataframe:"bid5,float64"` //委买价5 Ask5 float64 `json:"Ask5" array:"23" name:"委卖价5" dataframe:"ask5,float64"` //委卖价5 BidVol5 int64 `json:"BidVol5" array:"24" name:"委买量5" dataframe:"bidVol5,int64"` //委买量5 AskVol5 int64 `json:"AskVol5" array:"25" name:"委卖量5" dataframe:"askVol5,int64"` //委卖量5 }
type QuoteSnapshot ¶
type QuoteSnapshot struct { Market uint8 // 市场 Code string // 代码 Active1 uint16 // 活跃度 Price float64 // 现价 LastClose float64 // 昨收 Open float64 // 开盘 High float64 // 最高 Low float64 // 最低 ServerTime string // 时间 ReversedBytes0 int // 保留(时间 ServerTime) ReversedBytes1 int // 保留 Vol int // 总量 CurVol int // 现量 Amount float64 // 总金额 SVol int // 内盘 BVol int // 外盘 IndexOpenAmount int // 指数-集合竞价成交金额=开盘成交金额 StockOpenAmount int // 个股-集合竞价成交金额=开盘成交金额 OpenVolume int // 集合竞价-开盘量, 单位是股 TurnZ float64 // 开盘换手率Z Bid1 float64 Ask1 float64 BidVol1 int AskVol1 int Bid2 float64 Ask2 float64 BidVol2 int AskVol2 int Bid3 float64 Ask3 float64 BidVol3 int AskVol3 int Bid4 float64 Ask4 float64 BidVol4 int AskVol4 int Bid5 float64 Ask5 float64 BidVol5 int AskVol5 int ReversedBytes4 uint16 // 保留 ReversedBytes5 int // 保留 ReversedBytes6 int // 保留 ReversedBytes7 int // 保留 ReversedBytes8 int // 保留 Rate float64 // 涨速 Active2 uint16 // 活跃度 }
Click to show internal directories.
Click to hide internal directories.