Documentation ¶
Index ¶
- Constants
- Variables
- func BatchRealtimeBasicKLine(codes []string) error
- func FundFlow(securityCode string) pandas.DataFrame
- func GetCacheXdxrList(securityCode string) []quotes.XdxrInfo
- func GetMinutes(securityCode, date string) (list []quotes.HistoryMinuteTime)
- func GetTickAll(securityCode string)
- func GetTickData(securityCode string, date string) (list []quotes.TickTransaction)
- func GetTickStartDate() string
- func GetZxgList() []string
- func MonthlyKLine(securityCode string, cacheKLine ...[]KLine) (df pandas.DataFrame)
- func Transaction(securityCode, tradeDate string) []quotes.TickTransaction
- func UpdateTickStartDate(date string)
- func UpdateXdxrInfo(securityCode string)
- func WeeklyKLine(securityCode string, cacheKLine ...[]KLine) (df pandas.DataFrame)
- type KLine
Constants ¶
View Source
const ( TradingFirstTime = "09:25" // 第一个时间 TradingStartTime = "09:30" // 开盘时间 TradingFinalBiddingTime = "14:57" // 尾盘集合竞价时间 TradingLastTime = "15:00" // 最后一个时间 TickDefaultStartDate = "2023-01-01" // 分笔成交最早的日期 )
View Source
const ( BlockPath = "/T0002/blocknew" ZxgBlk = "zxg.blk" BkltBlk = "BKLT.blk" ZdBk = "ZDBK.blk" )
Variables ¶
View Source
var ( // BasicFields 特征基础字段 BasicFields = []string{"date", "open", "close", "high", "low", "volume", "amount"} )
View Source
var (
// DataDaysDiff 日期差异偏移量
DataDaysDiff = 1
)
View Source
var (
TdxFieldsFundFlow = []string{"日期", "主力净额金额(元)", "主力净额占比(%)", "超大单净买入金额(元)", "超大单净买入占比(%)", "大单净买入金额(元)", "大单净买入占比(%)", "主买净额金额(元)", "主买净额占比(%)"}
)
Functions ¶
func BatchRealtimeBasicKLine ¶ added in v0.4.6
BatchRealtimeBasicKLine 批量获取实时行情数据
func GetCacheXdxrList ¶
GetCacheXdxrList 获取除权除息的数据列表
func GetMinutes ¶
func GetMinutes(securityCode, date string) (list []quotes.HistoryMinuteTime)
GetMinutes 获取分时数据
func GetTickData ¶ added in v0.2.0
func GetTickData(securityCode string, date string) (list []quotes.TickTransaction)
GetTickData 获取指定日期的分笔成交记录
func GetTickStartDate ¶ added in v0.2.0
func GetTickStartDate() string
func GetZxgList ¶ added in v0.2.3
func GetZxgList() []string
func MonthlyKLine ¶ added in v0.2.6
MonthlyKLine 月K线
func Transaction ¶ added in v0.2.0
func Transaction(securityCode, tradeDate string) []quotes.TickTransaction
Transaction 获取指定日期的历史成交数据
func UpdateTickStartDate ¶ added in v0.2.0
func UpdateTickStartDate(date string)
UpdateTickStartDate 修改tick数据开始下载的日期
Types ¶
type KLine ¶
type KLine struct { Date string `dataframe:"date"` // 日期 Open float64 `dataframe:"open"` // 开盘价 Close float64 `dataframe:"close"` // 收盘价 High float64 `dataframe:"high"` // 最高价 Low float64 `dataframe:"low"` // 最低价 Volume float64 `dataframe:"volume"` // 成交量 Amount float64 `dataframe:"amount"` // 成交金额 Up int `dataframe:"up"` // 上涨家数 Down int `dataframe:"down"` // 下跌家数 }
KLine 日K线基础结构
func CheckoutKLines ¶
func UpdateAllBasicKLine ¶
UpdateAllBasicKLine 更新全部日K线基础数据并保存文件
Click to show internal directories.
Click to hide internal directories.