Watchlist Group
Get watched groups
SDK Links
Python | longport.openapi.QuoteContext.watchlist |
Rust | longport::quote::QuoteContext#watchlist |
Go | QuoteContext.Watchlist |
Node.js | QuoteContext#watchlist |
Request
| HTTP Method | GET |
| HTTP URL | /v1/watchlist/groups |
Request Example
python
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
json
{
"code": 0,
"data": {
"groups": [
{
"id": 28020,
"name": "all",
"securities": [
{
"symbol": "700.HK",
"market": "HK",
"name": "Tencent",
"watched_price": "364.4",
"watched_at": 1652855022
}
]
}
]
}
}Response Status
| Status | Description | Schema |
|---|---|---|
| 200 | Success | groups_response |
| 500 | Internal error | None |
Schemas
groups_response
| Name | Type | Required | Description |
|---|---|---|---|
| groups | object[] | false | Groups |
| ∟ id | integer | true | Group ID |
| ∟ name | string | true | Name |
| ∟ securities | object[] | true | Security |
| ∟∟ symbol | string | true | Symbol |
| ∟∟ market | string | true | Market |
| ∟∟ name | string | true | Name |
| ∟∟ watched_price | string | true | Watched price |
| ∟∟ watched_at | integer | true | Watched time |