Skip to Content

Get Subscriptions

This API is used to obtain the subscription information.

Quote Permission RequiredBasic

Included with OpenAPI activation β€” no extra purchase needed.

CLI
# list active real-time WebSocket subscriptions
longbridge subscriptions

Request ​

Protobuf ​

protobuf
message SubscriptionRequest {
}

Request Example ​

Response ​

Response Properties ​

NameTypeDescription
sub_listobject[]Subscribed data
∟ symbolstringSecurity code
∟ sub_type[]int32Subscription type, see SubType

Protobuf ​

protobuf
message SubscriptionResponse {
  repeated SubTypeList sub_list = 1;
}

message SubTypeList {
  string symbol = 1;
  repeated SubType sub_type = 2;
}

Response JSON Example ​

json
{
  "sub_list": [
    {
      "symbol": "700.HK",
      "sub_type": [1, 2, 3]
    },
    {
      "symbol": "AAPL.US",
      "sub_type": [2]
    }
  ]
}

Error Code ​

Protocol Error CodeBusiness Error CodeDescriptionTroubleshooting Suggestions
3301600Invalid requestInvalid request parameters or unpacking request failed
3301606Request rate limitReduce the frequency of requests
7301602Server errorPlease try again or contact a technician to resolve the issue