get security quotes

This commit is contained in:
bense
2022-05-09 12:56:02 +08:00
parent ab01ec7539
commit 0172cdb00e
8 changed files with 505 additions and 49 deletions

View File

@@ -2,6 +2,7 @@ package gotdx
import (
"fmt"
"gotdx/proto"
"testing"
)
@@ -52,3 +53,19 @@ func Test_tdx_GetSecurityCount(t *testing.T) {
_ = api.Disconnect()
}
func Test_tdx_GetSecurityQuotes(t *testing.T) {
api := prepare()
params := []proto.Stock{}
params = append(params, proto.Stock{Market: MarketSh, Code: "002062"})
params = append(params, proto.Stock{Market: MarketSh, Code: "000001"})
reply, err := api.GetSecurityQuotes(params)
if err != nil {
fmt.Println(err)
}
fmt.Println(reply)
_ = api.Disconnect()
}