Skip to main content

Get Native Token Balance by Account

POST

Retrieves the native token balance held by a specific account. The token type may vary depending on the selected chain. (e.g.,For Bitcoin, you can query the BTC balance.)
Path Parameters
chainstringrequired
Parameter specifying the target chain to query.
networkstringrequired
Parameter specifying the network of the target chain.
Request Body
accountAddressstringrequired
Parameter specifying the account address for balance query. It is a Base58-encoded string of 25-35 characters, always starting with "r".
Responses
ownerAddressstringrequired
Required response field that returns the address of the account that owns the balance, a Base58-encoded string 25-35 characters in length, always starting with "r".
balancestringrequired
Required response field indicating the total balance held by the account, providing the value in standard XRP units (1 XRP = 1,000,000 drops) instead of drops, the smallest XRP unit.
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter: { PARAMETER_NAME }"
}
cURL
curl -X POST 'https://web3.nodit.io/v1/xrpl/mainnet/native/getNativeTokenBalanceByAccount' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"accountAddress": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
}'