mirror of
https://github.com/bensema/gotdx.git
synced 2025-11-21 02:45:33 +08:00
get security quotes
This commit is contained in:
@@ -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()
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user