增加example

This commit is contained in:
钱纯净
2024-12-03 20:44:20 +08:00
parent 97b1b1a0e5
commit e443bb9134

View File

@@ -0,0 +1,20 @@
package main
import (
"github.com/injoyai/logs"
"github.com/injoyai/tdx"
"github.com/injoyai/tdx/example/common"
)
func main() {
common.Test(func(c *tdx.Client) {
resp, err := c.GetKlineYear("sz000001", 0, 800)
logs.PanicErr(err)
for _, v := range resp.List {
logs.Debug(v)
}
logs.Debug("总数:", resp.Count)
})
}