longportapp / openapi-go

Longbridge OpenAPI SDK for Go
https://open.longportapp.com
Apache License 2.0
20 stars 6 forks source link

获取不到夜盘行情 #48

Open coldcoder126 opened 1 month ago

coldcoder126 commented 1 month ago
func TestQuery(){
    var err error
    c, err := config.New(config.WithConfigKey(key, secret, token))
    c.EnableOvernight = true
    var qc *quote.QuoteContext
    qc, err = quote.NewFromCfg(c)
    quotes, err := qc.Quote(context.Background(), []string{"AAPL.US"})
    fmt.Println(quotes, err)
}

我是用以上代码查询,但是OverNightQuote仍然是nil,查询夜盘需要什么额外的权限吗,还是我的操作有误,望指正

Patrick0308 commented 1 month ago

有购买行情权限么,夜盘行情需要购买