Endpoint for private type
For the newly added
myOrder
andmyAsset
types, requests must be made towss://api.upbit.com/websocket/v1/private
. Please refer to the "General Information" for more details.
Request
The requests is consisted of JSON Object and the response is also JSON Object. Requests are divided into ticket field, type field, and format field, and multiple type fields can be specified in one request. Please refer to Request method and format for ticket field and format field.
Request format
[{Ticket Field},{Type Field},....,{Type Field},{Format Field}]
Type Field
In this field, you have to list the market data you want to receive.
Field Name | Type | Description | Required | Default |
---|---|---|---|---|
type | String | data type -ย myAsset : My Asset | O |
Response
Field Name | Simplified Format (format: SIMPLE) | Description | Type | Value |
---|---|---|---|---|
type | ty | Type | String | myAsset |
asset_uuid | astuid | Unique asset ID | String | |
assets | ast | List of assets | List of Objects | |
assets.currency | ast.cu | Currency symbol | String | |
assets.balance | ast.b | Orderable Amount/Quantity | Double | |
assets.locked | ast.l | Locked | Double | |
asset_timestamp | asttms | Asset timestamp | Long | |
timestamp | tms | Timestamp (millisecond) | Long | |
stream_type | st | Stream type | String | REALTIME |
Notice when using for the first time
When using for the first time, data transmission may not occur for several minutes. Therefore, please be sure to check data reception once during development.
For example, upon first use at 00:00 on April 1, 2024, data can be received from 00:05 even if there are changes in assets. If you reconnect at 00:10, this is not your first use, so you can receive data immediately in case of asset changes.
Example
Request
ex 1. To get all market information (not specify codes
field)
*Note: Cannot use codes
fields. In this case you will receive WRONG_FORMAT
error.
[
{
"ticket": "test-myasset"
},
{
"type": "myAsset"
}
]
Response
{
"type": "myAsset",
"asset_uuid": "e635f223-1609-4969-8fb6-4376937baad6",
"assets": [
{
"currency": "KRW",
"balance": 1386929.37231066771348207123,
"locked": 10329.670127489597585685
}
],
"asset_timestamp": 1710146517259,
"timestamp": 1710146517267,
"stream_type": "REALTIME"
}