longportapp / openapi-sdk

LongPort OpenAPI SDK Base.
https://open.longportapp.com
Apache License 2.0
112 stars 11 forks source link

模拟账户,python SDK,开启夜盘行情开关后,返回的数据中夜盘信息为None #52

Closed galaxy-spec closed 2 months ago

galaxy-spec commented 3 months ago

问题描述

模拟账户,python SDK 1.0.29,开启夜盘行情后,返回的数据中夜盘信息为None(已有行情权限) 1723009566112

代码例子 `

config = Config(app_key = stockMonitor.key, app_secret = stockMonitor.secret, access_token = stockMonitor.access, enable_overnight = True)

quoteContext = QuoteContext(config)

stocksInfo =  quoteContext.quote(["NVDA.US"])

print(stocksInfo)

`

错误信息或结果截图

[SecurityQuote { symbol: "NVDA.US", last_done: 104.250, prev_close: 100.450, open: 103.840, high: 107.710, low: 100.550, timestamp: "2024-08-06T20:00:00Z", volume: 409012089, turnover: 42911328143.000, trade_status: Normal, pre_market_quote: Some(PrePostQuote { last_done: 103.850, timestamp: "2024-08-06T23:59:59Z", volume: 7546532, turnover: 778366106.680, high: 109.840, low: 91.600, prev_close: 100.450 }), post_market_quote: Some(PrePostQuote { last_done: 101.560, timestamp: "2024-08-06T23:59:59Z", volume: 20073051, turnover: 2097905852.431, high: 109.840, low: 91.600, prev_close: 104.250 }), overnight_quote: None }]

返回信息末尾 overnight_quote: None

你的环境信息

QFCG commented 2 months ago

夜盘行情需要购买才可以,目前的美股实时行情权限,可能是赠送的。 如果您确认已经购买,可以提供一下 memberId 给我们排查下,这个可以使用 SDK 的 quoteContext.memberId 查看。

Changjinxing commented 1 month ago

求助客服后发现需要这个权限 image