修复codes的LastPrice价格不对的问题,只做了简单验证

This commit is contained in:
injoyai
2025-05-29 09:19:34 +08:00
parent c5f62c15b3
commit bc45a72d8d
5 changed files with 56 additions and 14 deletions

View File

@@ -3,20 +3,18 @@ package main
import (
"github.com/injoyai/logs"
"github.com/injoyai/tdx"
"github.com/injoyai/tdx/example/common"
"github.com/injoyai/tdx/protocol"
)
func main() {
c, err := tdx.Dial("124.71.187.122:7709")
logs.PanicErr(err)
common.Test(func(c *tdx.Client) {
resp, err := c.GetCode(protocol.ExchangeSH, 369)
logs.PanicErr(err)
resp, err := c.GetCode(protocol.ExchangeSH, 369)
logs.PanicErr(err)
for i, v := range resp.List {
logs.Debug(i, v)
}
logs.Debug("总数:", resp.Count)
select {}
for i, v := range resp.List {
logs.Debug(i, v, v.LastPrice)
}
logs.Debug("总数:", resp.Count)
})
}