Documentation ¶
Index ¶
- Constants
- Variables
- func BasicKLineForSnapshot(v quotes.Snapshot)
- func BatchRealtimeBasicKLine(codes []string) error
- func CheckoutTransactionData(securityCode string, date string, ignorePreviousData bool) (list []quotes.TickTransaction)
- func FundFlow(securityCode string) pandas.DataFrame
- func GetAllHistoricalTradingData(securityCode string)
- func GetBeginDateOfHistoricalTradingData() string
- func GetCacheXdxrList(securityCode string) []quotes.XdxrInfo
- func GetHistoricalTradingData(securityCode, tradeDate string) []quotes.TickTransactiondeprecated
- func GetHistoricalTradingDataByDate(securityCode string, date string) (list []quotes.TickTransaction)
- func GetMinutes(securityCode, date string) (list []quotes.MinuteTime)
- func GetZxgList() []string
- func MonthlyKLine(securityCode string, cacheKLine ...[]KLine) (df pandas.DataFrame)
- func RestoreBeginDateOfHistoricalTradingData()
- func UpdateBeginDateOfHistoricalTradingData(date string)
- func UpdateCacheKLines(securityCode string, klines []KLine)
- func UpdateMinutes(securityCode, date string)
- func UpdateXdxrInfo(securityCode string)
- func WeeklyKLine(securityCode string, cacheKLine ...[]KLine) (df pandas.DataFrame)
- type KLine
Constants ¶
View Source
const ( BlockPath = "/T0002/blocknew" ZxgBlk = "zxg.blk" BkltBlk = "BKLT.blk" ZdBk = "ZDBK.blk" )
Variables ¶
View Source
var (
// DataDaysDiff 日期差异偏移量
DataDaysDiff = 1
)
View Source
var (
ErrTdxApiQuotesTickMaxBatchSizeExceeded = errors.New(fmt.Sprintf("[tdx-api-quotes-tick]batch size exceeded maximum(%d) limit", quotes.TDX_SECURITY_QUOTES_MAX))
)
View Source
var (
TdxFieldsFundFlow = []string{"日期", "主力净额金额(元)", "主力净额占比(%)", "超大单净买入金额(元)", "超大单净买入占比(%)", "大单净买入金额(元)", "大单净买入占比(%)", "主买净额金额(元)", "主买净额占比(%)"}
)
Functions ¶
func BasicKLineForSnapshot ¶
BasicKLineForSnapshot 通过snapshot更新基础K线
func BatchRealtimeBasicKLine ¶
BatchRealtimeBasicKLine 批量获取实时行情数据
func CheckoutTransactionData ¶ added in v1.1.5
func CheckoutTransactionData(securityCode string, date string, ignorePreviousData bool) (list []quotes.TickTransaction)
CheckoutTransactionData 获取指定日期的分笔成交记录
先从缓存获取, 如果缓存不存在, 则从服务器下载 K线附加成交数据
func GetAllHistoricalTradingData ¶ added in v1.1.8
func GetAllHistoricalTradingData(securityCode string)
GetAllHistoricalTradingData 下载全部历史成交数据
func GetBeginDateOfHistoricalTradingData ¶ added in v1.1.8
func GetBeginDateOfHistoricalTradingData() string
GetBeginDateOfHistoricalTradingData 获取系统默认的历史成交数据的最早日期
func GetCacheXdxrList ¶
GetCacheXdxrList 获取除权除息的数据列表
func GetHistoricalTradingData
deprecated
added in
v1.1.8
func GetHistoricalTradingData(securityCode, tradeDate string) []quotes.TickTransaction
GetHistoricalTradingData 获取指定日期的历史成交数据
Deprecated: 废弃的函数, 推荐 CheckoutTransactionData [wangfeng on 2024/1/31 17:26]
func GetHistoricalTradingDataByDate ¶ added in v1.1.8
func GetHistoricalTradingDataByDate(securityCode string, date string) (list []quotes.TickTransaction)
GetHistoricalTradingDataByDate 获取指定日期的历史成交记录
func GetMinutes ¶
func GetMinutes(securityCode, date string) (list []quotes.MinuteTime)
GetMinutes 获取分时数据
func GetZxgList ¶
func GetZxgList() []string
func MonthlyKLine ¶
MonthlyKLine 月K线
func RestoreBeginDateOfHistoricalTradingData ¶ added in v1.5.0
func RestoreBeginDateOfHistoricalTradingData()
RestoreBeginDateOfHistoricalTradingData 恢复默认的成交数据最早日期
func UpdateBeginDateOfHistoricalTradingData ¶ added in v1.1.8
func UpdateBeginDateOfHistoricalTradingData(date string)
UpdateBeginDateOfHistoricalTradingData 修改tick数据开始下载的日期
func UpdateCacheKLines ¶
UpdateCacheKLines 更新缓存K线
Types ¶
type KLine ¶
type KLine struct { Date string `name:"日期" dataframe:"date"` // 日期 Open float64 `name:"开盘" dataframe:"open"` // 开盘价 Close float64 `name:"收盘" dataframe:"close"` // 收盘价 High float64 `name:"最高" dataframe:"high"` // 最高价 Low float64 `name:"最低" dataframe:"low"` // 最低价 Volume float64 `name:"成交量(股)" dataframe:"volume"` // 成交量 Amount float64 `name:"成交额(元)" dataframe:"amount"` // 成交金额 Up int `name:"上涨/外盘" dataframe:"up"` // 上涨家数 Down int `name:"下跌/内盘" dataframe:"down"` // 下跌家数 Datetime string `name:"时间" dataframe:"datetime"` // 时间 }
KLine 日K线基础结构
func UpdateAllBasicKLine ¶
UpdateAllBasicKLine 更新全部日K线基础数据并保存文件
Click to show internal directories.
Click to hide internal directories.