mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
增加了获取股票数量的接口
This commit is contained in:
19
example/GetStockCount/main.go
Normal file
19
example/GetStockCount/main.go
Normal file
@@ -0,0 +1,19 @@
|
||||
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")
|
||||
logs.PanicErr(err)
|
||||
|
||||
resp, err := c.GetStockCount(protocol.ExchangeSH)
|
||||
logs.PanicErr(err)
|
||||
|
||||
logs.Debug(resp.Count)
|
||||
|
||||
<-c.Done()
|
||||
}
|
||||
Reference in New Issue
Block a user