Skip to content

User wallets ​

User wallets: deposit addresses and balances

All deposit addresses of a user ​

http
GET /v1/wallets/{user_id}/addresses

API key scope: read

All deposit addresses of a user; an empty list if the user does not exist

Parameters

NameInTypeRequiredDescription
user_idpathstringyesUser ID: the merchant's own user identifier

Response (200, AddressList)

FieldTypeDescription
addressesobject (Address)[]
addresses[].addressstring
addresses[].chain_codestring
addresses[].create_timestringCreation time (Unix milliseconds)
addresses[].statusstringACTIVE
addresses[].user_idstring

Response example:

json
{
  "addresses": [
    {
      "address": "TXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBf",
      "chain_code": "TRON",
      "create_time": "1762650000000",
      "status": "ACTIVE",
      "user_id": "u_10001"
    }
  ]
}

On failure the unified error body is returned; see Errors.

Get or create a deposit address ​

http
POST /v1/wallets/{user_id}/addresses

API key scope: deposit

Get or create a deposit address: creates the user wallet if missing and derives the address for the chain if missing; idempotent — repeated calls return the same address

Parameters

NameInTypeRequiredDescription
user_idpathstringyesUser ID: the merchant's own user identifier

Request body

FieldTypeDescription
chain_codestringChain code
master_key_idstringMaster key ID: optional; only takes effect when the user wallet is first created; defaults to the merchant's current ACTIVE master key
user_idstringUser ID: the merchant's own user identifier

Request example:

json
{
  "chain_code": "TRON",
  "master_key_id": "",
  "user_id": "u_10001"
}

Response (200, Address)

FieldTypeDescription
addressstring
chain_codestring
create_timestringCreation time (Unix milliseconds)
statusstringACTIVE
user_idstring

Response example:

json
{
  "address": "TXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBf",
  "chain_code": "TRON",
  "create_time": "1762650000000",
  "status": "ACTIVE",
  "user_id": "u_10001"
}

On failure the unified error body is returned; see Errors.

User balances ​

http
GET /v1/wallets/{user_id}/balances

API key scope: read

User balances: available / frozen per asset (only credited, confirmed deposits and internal transfers); an empty list if the user does not exist

Parameters

NameInTypeRequiredDescription
user_idpathstringyesUser ID: the merchant's own user identifier

Response (200, BalanceList)

FieldTypeDescription
balancesobject (Balance)[]
balances[].availablestringAvailable (main unit)
balances[].available_rawstringAvailable (integer, smallest unit)
balances[].chain_codestring
balances[].decimalsinteger
balances[].frozenstringFrozen (main unit)
balances[].frozen_rawstringFrozen (integer, smallest unit)
balances[].token_codestring
balances[].update_timestringLast change time (Unix milliseconds)

Response example:

json
{
  "balances": [
    {
      "available": "100.5",
      "available_raw": "100500000",
      "chain_code": "TRON",
      "decimals": 6,
      "frozen": "0",
      "frozen_raw": "0",
      "token_code": "USDT",
      "update_time": "1762650000000"
    }
  ]
}

On failure the unified error body is returned; see Errors.