增加了历史分时成交

This commit is contained in:
injoyai
2024-10-29 14:54:58 +08:00
parent 9eac8cbc1a
commit 64d993a366
13 changed files with 251 additions and 33 deletions

View File

@@ -0,0 +1,23 @@
package main
import (
"github.com/injoyai/logs"
"github.com/injoyai/tdx"
"github.com/injoyai/tdx/example/common"
"github.com/injoyai/tdx/protocol"
"time"
)
func main() {
common.Test(func(c *tdx.Client) {
t := time.Date(2024, 10, 29, 0, 0, 0, 0, time.Local)
resp, err := c.GetStockHistoryMinuteTrade(t, protocol.ExchangeSH, "000001", 0, 2000)
logs.PanicErr(err)
for _, v := range resp.List {
logs.Debug(v)
}
logs.Debug("总数:", resp.Count)
})
}

View File

@@ -10,11 +10,11 @@ func main() {
c, err := tdx.Dial("124.71.187.122:7709")
logs.PanicErr(err)
resp, err := c.GetStockList(protocol.ExchangeSH, 255)
resp, err := c.GetStockList(protocol.ExchangeSH, 369)
logs.PanicErr(err)
for _, v := range resp.List {
logs.Debug(v)
for i, v := range resp.List {
logs.Debug(i, v)
}
logs.Debug("总数:", resp.Count)

View File

@@ -10,7 +10,7 @@ func main() {
c, err := tdx.Dial("124.71.187.122:7709")
logs.PanicErr(err)
resp, err := c.GetStockMinute(protocol.ExchangeSZ, "000001")
resp, err := c.GetStockMinute(protocol.ExchangeSH, "000001")
logs.PanicErr(err)
for _, v := range resp.List {

View File

@@ -10,7 +10,7 @@ import (
func main() {
common.Test(func(c *tdx.Client) {
resp, err := c.GetStockMinuteTrade(protocol.ExchangeSH, "000001", 0, 100)
resp, err := c.GetStockMinuteTrade(protocol.ExchangeSH, "000001", 0, 1900)
logs.PanicErr(err)
for _, v := range resp.List {