优化GetHistoryTradeFull,需要传入Workday,减少非工作日的查询操作

This commit is contained in:
injoyai
2025-10-20 16:00:09 +08:00
parent 0b35006323
commit ad0abbe6ba

View File

@@ -457,7 +457,7 @@ func (this *Client) GetHistoryTradeBefore(code string, w *Workday, before time.T
start := time.Date(resp.List[0].Time.Year(), resp.List[0].Time.Month(), 1, 0, 0, 0, 0, resp.List[0].Time.Location())
var res *protocol.TradeResp
w.Range(start, before, func(t time.Time) bool {
res, err = this.GetHistoryTradeDay(start.Format("20060102"), code)
res, err = this.GetHistoryTradeDay(t.Format("20060102"), code)
if err != nil {
return false
}