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

@@ -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
}