Asset Balance Interface
Return balance of target token
POST https://admin.ccpayment.com/ccpayment/v1/assets
Return the balance of the target token
Headers
Timestamp*
string
Timestamp in seconds (10-digit). The request is valid for two minutes.
Content-Type*
String
application/json; charset=utf-8
Request Body
coin_id
string
Coin ID for the target coin. Get coin id by calling interface or checking it on the sheet Get the balance of all assets if no parameters are included in the request body.
Response
Header
Appid
202302010636261620672405236006912
Y
string
Merchant's unique credential. Find it on the Developer page.
Timestamp
1677152490
Y
string
Timestamp in seconds (10-digit). The request is valid for two minutes.
Sign
871f0223c66ea72435208d03603a0cb00b90f6ac4a4ba725d00164d967e291f6
Y
string
SHA-256 (appId + appSecret + timestamp+body (json string))
Body
{
"code": 10000,
"msg": "success",
"data": {
"list": [
{
"coin_id": "8e5741cf-6e51-4892-9d04-3d40e1dd0128",
"crypto": "USDT",
"name": "Tether USD",
"value": "127.9514",
"price": "1",
"logo": "https://resource.cwallet.com/token/icon/usdt.png"
}
]
}
}Parameters
code
10000
Integer
msg
Success
String
data
Object
data.list
array
data.list.coin_id
8e5741cf-6e51-4892-9d04-3d40e1dd0128
String
Token ID of the target token
data.list.crypto
USDT
String
Token symbol
data.list.name
Tether USD
string
Token fullname
data.list.value
127.9514
string
Balance of the target token
data.list.price
1
string
Current rate of the target token
{
"code": 224066,
"msg": "service err, please try again"
}As a security measure, we will sign the returned data (and according to this only { code: 10000 } should be signed, but it's signing all the returned body.). Additionally, it will return Appid, Sign, Timestamp in the header of the response. The signature method SHA-256 (appid+appSecret+Timestamp+body).
Please use the data with caution if the signature verification fails. It indicates that the data has been tampered with.
Request Body Example
{
"coin_id": "8e5741cf-6e51-4892-9d04-3d40e1dd0128"
}Last updated