准备增加获取指数函数

This commit is contained in:
钱纯净
2025-02-17 00:27:29 +08:00
parent e5bbb38aee
commit 8e7135eabb
5 changed files with 122 additions and 0 deletions

View File

@@ -501,3 +501,21 @@ func (this *Client) GetKlineYearAll(code string) (*protocol.KlineResp, error) {
func (this *Client) GetKlineYearUntil(code string, f func(k *protocol.Kline) bool) (*protocol.KlineResp, error) {
return this.GetKlineUntil(protocol.TypeKlineYear, code, f)
}
/*
*/
func (this *Client) GetIndex(Type uint8, code string, start, count uint16) (*protocol.IndexResp, error) {
//f, err := protocol.MIndex.Frame(Type, code, start, count)
//if err != nil {
// return nil, err
//}
f := protocol.MIndex.Frame()
result, err := this.SendFrame(f, Type)
if err != nil {
return nil, err
}
return result.(*protocol.IndexResp), nil
}