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:
15
client.go
15
client.go
@@ -129,8 +129,8 @@ func (client *Client) Disconnect() error {
|
||||
}
|
||||
|
||||
// GetSecurityCount 获取指定市场内的证券数目
|
||||
func (client *Client) GetSecurityCount(market uint16) (*proto.SecurityCountReply, error) {
|
||||
obj := proto.NewSecurityCount()
|
||||
func (client *Client) GetSecurityCount(market uint16) (*proto.GetSecurityCountReply, error) {
|
||||
obj := proto.NewGetSecurityCount()
|
||||
obj.SetParams(market)
|
||||
err := client.do(obj)
|
||||
if err != nil {
|
||||
@@ -138,3 +138,14 @@ func (client *Client) GetSecurityCount(market uint16) (*proto.SecurityCountReply
|
||||
}
|
||||
return obj.Reply, err
|
||||
}
|
||||
|
||||
// GetSecurityQuotes 获取盘口五档报价
|
||||
func (client *Client) GetSecurityQuotes(params []proto.Stock) (*proto.GetSecurityQuotesReply, error) {
|
||||
obj := proto.NewGetSecurityQuotes()
|
||||
obj.SetParams(params)
|
||||
err := client.do(obj)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.Reply, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user