mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
减少方法名称长度,去掉固定前缀Stock
This commit is contained in:
28
example/GetMinuteTrade/main.go
Normal file
28
example/GetMinuteTrade/main.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/injoyai/logs"
|
||||
"github.com/injoyai/tdx"
|
||||
"github.com/injoyai/tdx/example/common"
|
||||
"github.com/injoyai/tdx/protocol"
|
||||
)
|
||||
|
||||
func main() {
|
||||
common.Test(func(c *tdx.Client) {
|
||||
|
||||
resp, err := c.GetMinuteTrade(protocol.MinuteTradeReq{
|
||||
Exchange: protocol.ExchangeSZ,
|
||||
Code: "000001",
|
||||
Start: 0,
|
||||
Count: 100,
|
||||
})
|
||||
logs.PanicErr(err)
|
||||
|
||||
for _, v := range resp.List {
|
||||
logs.Debug(v)
|
||||
}
|
||||
|
||||
logs.Debug("总数:", resp.Count)
|
||||
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user