This document provides example request and subscription payloads for receiving personal asset data via WebSocket.
Real-Time Streaming Method for My Asset
For My Asset data, the real-time stream transmits updates only when there is an actual change in the asset balance. Therefore, it is normal behavior that no data is received if no asset changes occur after connection. Please refer to the WebSocket Usage Guide – Connection Management to ensure your client implementation maintains the connection even when no data is transmitted.
Important Notice for Initial Use of My Asset WebSocket StreamWhen subscribing to the My Asset WebSocket stream for the first time, data reception may not occur properly for several minutes regardless of asset changes. After the initial connection to the account, please ensure to verify data reception through reconnection or other means before using the stream. For example, if you first use the stream at 00:00 on May 1, 2025, even if asset changes occur, the stream data might only start transmitting from 00:05. Upon reconnecting at 00:10, since this is not the initial connection, the stream will provide immediate updates upon asset changes.
WebSocket Endpoint
| Type | Endpoint |
|---|---|
| Private | wss://{region}-api.upbit.com/websocket/v1/private |
Use the endpoint for your region.
| Region | Endpoint |
|---|---|
| Singapore | wss://sg-api.upbit.com/websocket/v1/private |
| Indonesia | wss://id-api.upbit.com/websocket/v1/private |
| Thailand | wss://th-api.upbit.com/websocket/v1/private |
Private WebSocket Connection Management GuideWhen a large number of Private WebSocket connections are maintained simultaneously, new connection attempts may be rejected. Please minimize unnecessary connections and, where possible, subscribe to the required data types through a single existing connection.
Request Message Format
To request announcement data, after establishing a WebSocket connection, create a JSON Object with the structure below and include it as a Data Type Object 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 Name | Type | Description | Required | Default |
|---|---|---|---|---|
| type | String | Data type to receive. Set to myAsset to receive data. | Required | |
| format | String | Data format to receive.DEFAULT: Default format.SIMPLE: Simplified format with abbreviated field names.JSON_LIST: List format.SIMPLE_LIST: List format with abbreviated field names. | Required |
Subscription Data Specification
When a new announcement is published or an existing announcement is updated, real-time stream data is returned as follows.
| Field Name | Abbreviation | Description | Type | Value Example |
|---|---|---|---|---|
| type | ty | Data type | String | myAsset |
| asset_uuid | astuid | Unique identifier of the asset | String | |
| assets | ast | List of assets | List of Objects | |
| assets.currency | ast.cu | Currency code | String | |
| assets.balance | ast.b | Available quantity for orders | Double | |
| assets.locked | ast.l | Quantity locked in active orders | Double | |
| asset_timestamp | asttms | Asset timestamp (ms) | Long | |
| timestamp | tms | Timestamp (ms) | Long | |
| stream_type | st | Stream type | String | REALTIME : Real-time |
Examples
Subscription Request Example
[
{
"ticket": "0e66c0ac-7e13-43ef-91fb-2a87c2956c49"
},
{
"type": "myAsset"
}
]Subscription Data Example
{
"type": "myAsset",
"asset_uuid": "e635f223-1609-4969-8fb6-4376937baad6",
"assets": [
{
"currency": "SGD",
"balance": 1386929.37231066771348207123,
"locked": 10329.670127489597585685
}
],
"asset_timestamp": 1710146517259,
"timestamp": 1710146517267,
"stream_type": "REALTIME"
}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.name | Reason | Recommended Action |
|---|---|---|
INVALID_AUTH | Missing authentication information or authentication token verification failure | When 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_FORMAT | Invalid request message format | Make sure the request message follows the WebSocket request format. Check the Object structure as well as the type and value of each field. |
NO_TICKET | Missing ticket field | Make sure the request message includes a Ticket Object and the ticket field. |
NO_TYPE | Missing type field | Make sure the Data Type Object includes the type field and specify the data type to subscribe to. |
NO_CODES | Missing codes field | Check whether the subscribed data type requires the codes field and specify the trading pair codes to receive. |
INVALID_PARAM | Missing required request field or unsupported value | Make sure all required fields are included and that each field contains a supported value. |
Too Many Requests | Request rate limit exceeded | Wait until another request can be made, then retry. Refer to the Rate Limits section for details. |
I'm a teapot | Requests are temporarily restricted due to repeated Too Many Requests errors | Check 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 Group | Policy | Applied By |
|---|---|---|
websocket-connect | Up to 5 connections per second | Account |
websocket-message | Up to 5 messages per second and 100 messages per minute | Connection |
Managing WebSocket Rate LimitsUnlike 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..
