吧代码的传参方式从sz,000001改成sz000001

This commit is contained in:
钱纯净
2024-11-05 00:18:20 +08:00
parent 39057e5305
commit c90adef204
15 changed files with 84 additions and 139 deletions

View File

@@ -3,12 +3,11 @@ package main
import (
"github.com/injoyai/logs"
"github.com/injoyai/tdx"
"github.com/injoyai/tdx/protocol"
)
func main() {
c, err := tdx.Dial("124.71.187.122:7709")
c, err := tdx.Dial("124.71.187.122:7709", tdx.WithDebug())
logs.PanicErr(err)
_ = c
@@ -16,19 +15,17 @@ func main() {
/*
发送:
0c02000000011a001a003e05050000000000000002000030303030303101363030303038
0c01000000011a001a003e05050000000000000002000030303030303101363030303038
接收:
b1cb74001c00000000000d005100bd00789c6378c1cecb252ace6066c5b4898987b9050ed1f90cc5b74c18a5bc18c1b43490fecff09c81819191f13fc3c9f3bb169f5e7dfefeb5ef57f7199a305009308208e5b32bb6bcbf70148712002d7f1e13
b1cb74000c02000000003e05ac00ac000102020000303030303031601294121a1c2d4eadabcf0ed412aae5fc01afb0024561124fbcc08301afa47900b2e3174100bf68871a4201b741b6144302bb09af334403972e96354504ac09b619560e00000000f8ff601201363030303038b60fba04060607429788a70efa04ada37ab2531c12974d91e7449dbc354184b6010001844bad324102b5679ea1014203a65abd8d0143048a6ba4dd01440587e101b3d2029613000000000000b60f
*/
resp, err := c.GetQuote(map[protocol.Exchange]string{
protocol.ExchangeSZ: "000001",
protocol.ExchangeSH: "600008",
})
resp, err := c.GetQuote("sz000001", "sh600008")
logs.PanicErr(err)
for _, v := range resp {
logs.Debugf("%#v\n", v)
logs.Debug(v)
}
select {}