Skip to main content

Get watched groups

Get watched groups

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": "Tencent",
"watched_price": "364.4",
"watched_at": 1652855022
}
]
}
]
}
}

Response Status

StatusDescriptionSchema
200Successgroups_response
500Internal errorNone

Schemas

groups_response

NameTypeRequiredDescription
groupsobject[]falseGroups
∟ idintegertrueGroup ID
∟ namestringtrueName
∟ securitiesobject[]trueSecurity
∟∟ symbolstringtrueSymbol
∟∟ marketstringtrueMarket
∟∟ namestringtrueName
∟∟ watched_pricestringtrueWatched price
∟∟ watched_atintegertrueWatched time