跳到主要內容

獲取關注分組

獲取關注分組

SDK Links

Python
longport.openapi.QuoteContext.watchlist
Rust
longport::quote::QuoteContext#watchlist
Go
QuoteContext.Watchlist
Node.js
QuoteContext#watchlist

Request

HTTP MethodGET
HTTP URL/v1/watchlist/groups

Request Example

from longport.openapi import QuoteContext, Config

config = Config.from_env()
ctx = QuoteContext(config)
resp = ctx.watchlist()
print(resp)

Response

Response Headers

  • Content-Type: application/json

Response Example

{
"code": 0,
"data": {
"groups": [
{
"id": 28020,
"name": "all",
"securities": [
{
"symbol": "700.HK",
"market": "HK",
"name": "騰訊控股",
"watched_price": "364.4",
"watched_at": 1652855022
}
]
}
]
}
}

Response Status

StatusDescriptionSchema
200返回成功groups_response
500內部錯誤None

Schemas

groups_response

NameTypeRequiredDescription
groupsobject[]false分組
∟ idintegertrue分組 ID
∟ namestringtrue名稱
∟ securitiesobject[]true股票
∟∟ symbolstringtrue代碼
∟∟ marketstringtrue市場
∟∟ namestringtrue名稱
∟∟ watched_pricestringtrue關注時的價格
∟∟ watched_atintegertrue關注時間