获取自选股分组
获取自选股分组
SDK Links
Python |
Rust |
Go |
Node.js |
Request
HTTP Method | GET |
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
Status | Description | Schema |
---|---|---|
200 | 返回成功 | groups_response |
500 | 内部错误 | None |
Schemas
groups_response
Name | Type | Required | Description |
---|---|---|---|
groups | object[] | false | 分组 |
∟ id | integer | true | 分组 ID |
∟ name | string | true | 名称 |
∟ securities | object[] | true | 股票 |
∟∟ symbol | string | true | 代码 |
∟∟ market | string | true | 市场 |
∟∟ name | string | true | 名称 |
∟∟ watched_price | string | true | 关注时的价格 |
∟∟ watched_at | integer | true | 关注时间 |