List Subscriptions

You can verify the data stream items currently subscribed to through the WebSocket connection.

Method

Unlike data subscription request messages that include the "type" field, the request message for retrieving the list of subscribed streams includes the "method" field and functions as an operation message. Similar to data subscription request messages, the request is sent as a JSON array containing the Ticket field, Format field, and the "method" field.

Precautions When Specifying the Format Field

When requesting the list of subscribed streams, please specify the Format field in the same format as used during the actual data subscription request. Requesting in a different format will change the format of the currently subscribed data streams as well, so caution is advised. For example, if you have been receiving real-time streams in SIMPLE format but request this operation in DEFAULT format, the subscribed real-time streams will also be received in DEFAULT format.

WebSocket Endpoint

List Subscriptions can be used with both Public and Private WebSocket connections.

TypeEndpoint
Publicwss://{region}-api.upbit.com/websocket/v1
Privatewss://{region}-api.upbit.com/websocket/v1/private

Use the endpoint for your region and the WebSocket connection whose subscriptions you want to retrieve.

RegionPublic EndpointPrivate Endpoint
Singaporewss://sg-api.upbit.com/websocket/v1wss://sg-api.upbit.com/websocket/v1/private
Indonesiawss://id-api.upbit.com/websocket/v1wss://id-api.upbit.com/websocket/v1/private
Thailandwss://th-api.upbit.com/websocket/v1wss://th-api.upbit.com/websocket/v1/private

Request Message Format

To retrieve the list of data streams currently subscribed to through an active WebSocket connection, create a JSON Object with the structure below and include it in the request message.

For the complete WebSocket request message specification, including the Ticket and Format Objects, refer to the WebSocket Usage and Error Guide.

Field NameTypeDescriptionRequiredDefault
methodStringRequest method. Set to LIST_SUBSCRIPTIONS to retrieve the currently subscribed data streams.Required

Precautions When Specifying the Format Field

When requesting the list of subscribed streams, specify the Format Object in the same format as the current subscription. Using a different format also changes the format of the currently subscribed data streams.

Response Specification

Field NameAbbreviationDescriptionTypeValue
methodmthdRequest methodStringLIST_SUBSCRIPTIONS
resultrsltList of currently subscribed data streamsList of Objects
result.typerslt.tySubscribed data typeString
result.codesrslt.cdsList of subscribed pair codesList of String
result.levelrslt.lvOrderbook aggregation unitDouble
tickettcktRequest ticket identifierString

Examples

Request Example

[
  {
    "ticket": "0e66c0ac-7e13-43ef-91fb-2a87c2956c49"
  },
  {
    "method": "LIST_SUBSCRIPTIONS"
  }
]

Response Examples

Public WebSocket

{
  "method": "LIST_SUBSCRIPTIONS",
  "result": [
    {
      "type": "ticker",
      "codes": ["BTC-ETH"]
    },
    {
      "type": "orderbook",
      "codes": ["BTC-ETH"]
    }
  ],
  "ticket": "unique uuid"
}

Private WebSocket

{
  "method": "LIST_SUBSCRIPTIONS",
  "result": [
    {
      "type": "myAsset"
    },
    {
      "type": "myOrder",
      "codes": ["BTC-ETH"]
    },
    {
      "type": "announcement"
    }
  ],
  "ticket": "unique uuid"
}

Error Information

If an error occurs after establishing a WebSocket connection and sending a request, the response is returned in the following JSON format.

{
  "error": {
    "name": "ERROR_CODE",
    "message": "ERROR_MESSAGE"
  }
}

The main error codes that may be returned are listed below.

error.nameReasonRecommended Action
INVALID_AUTHMissing authentication information or authentication token verification failureWhen using a Private WebSocket endpoint, make sure you are connected to the correct endpoint and that the Authorization header contains a valid authentication token.
WRONG_FORMATInvalid request message formatMake sure the request message follows the WebSocket request format. Check the Object structure as well as the type and value of each field.
NO_TICKETMissing ticket fieldMake sure the request message includes a Ticket Object and the ticket field.
NO_TYPEMissing type fieldMake sure the Data Type Object includes the type field and specify the data type to subscribe to.
NO_CODESMissing codes fieldCheck whether the subscribed data type requires the codes field and specify the trading pair codes to receive.
INVALID_PARAMMissing required request field or unsupported valueMake sure all required fields are included and that each field contains a supported value.
Too Many RequestsRequest rate limit exceededWait until another request can be made, then retry. Refer to the Rate Limits section for details.
I'm a teapotRequests are temporarily restricted due to repeated Too Many Requests errorsCheck the restriction period included in the response and retry after the specified time has passed.

Rate Limits

APIs are grouped into Rate Limit groups. APIs within the same group share the same per-second request limit.

The maximum number of requests allowed per Rate Limit group may change after prior notice according to service policy, and additional restrictions may be applied depending on service conditions. For details, refer to Rate Limits.

Rate Limit GroupPolicyApplied By
websocket-connectUp to 5 connections per secondPublic : IP
Private: Account
websocket-messageUp to 5 messages per second and 100 messages per minuteConnection

Managing WebSocket Rate Limits

Unlike REST API responses, WebSocket does not provide the number of remaining requests. Clients should track the number of WebSocket connection attempts and data request messages they send to ensure compliance with the applicable rate limits. If a rate limit is reached, wait for an appropriate period before sending another request..