Query currency balance
POST/transaction/balance
Query the balance of all currencies in a specific contract address.
Request
- application/json
Body
chainId int32required
Chain ID
This is the platform internal ID, not the chain ID on the chain or from the wallet, can be obtained from Get Chain List interface
contractAddress stringrequired
Contract address
Contract address for querying currency balance
Responses
- 200
- 401
- 403
- 404
OK
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
code int32required
Status code
msg stringrequired
Status message on success or error message on failure
description string
Detailed description when error
data
object[]
required
List of currency balances
currencyId int32required
Currency ID
Can be obtained from Get Currency List interface
balance stringrequired
Currency balance
Note: The value of this field is an integer, calculated by (actual_amount * 10^currency_decimals)
currencyAddress stringrequired
Currency address on the chain
currencySymbol stringrequired
Currency symbol
precision int32required
Currency decimals
{
"code": 0,
"msg": "string",
"description": "string",
"data": [
{
"currencyId": 0,
"balance": "string",
"currencyAddress": "string",
"currencySymbol": "string",
"precision": 0
}
]
}
{
"code": 200,
"msg": "success",
"data": [
{
"currencyId": 1,
"balance": "100000000",
"currencyAddress": "TLBP2BJykHX3AMaxPttaQdYVTChQpCThK3",
"currencySymbol": "USDT",
"precision": 6
}
]
}
Unauthorized
Forbidden
Not Found
Loading...