Retrieve native balance
How to retrieve the native balance of a wallet.
Retrieve the native balance of a wallet by:
- The wallet
id
- The blockchain and wallet address
1. Get native balance by wallet id
id
Read how to get all token balances by wallet
id
.
Request Endpoint: reference
GET /api/wallets/{walletId}/balance
Parameter | Param Type | Description | Data Type | Mandatory |
---|---|---|---|---|
{walletId} | Path | The ID of the wallet | String | ✅ |
Example Request
GET /api/wallets/a7185cb1-66ec-41c7-94e3-be7a7e17ee67/balance
Response Body
{
"success": true,
"result": {
"available": true,
"secretType": "MATIC",
"balance": 0.009474999998803,
"gasBalance": 0.009474999998803,
"symbol": "POL",
"gasSymbol": "POL",
"rawBalance": "9474999998803000",
"rawGasBalance": "9474999998803000",
"decimals": 18,
"exchange": {
"usdPrice": 0.45474635658060353,
"usdBalanceValue": 0.004308721728056887
}
}
}
2. Get native balance by blockchain and wallet address
Read how to get all token balances by by blockchain and wallet address.
Request Endpoint: reference
GET /api/wallets/{secretType}/{walletAddress}/balance
Parameter | Param Type | Description | Data Type | Mandatory |
---|---|---|---|---|
{secretType} | Path | Indication on which chain the balance should be fetched | String | ✅ |
{walletAddress} | Path | The address of the wallet | String | ✅ |
Example Request
GET /api/wallets/MATIC/0xF8e6A6F31DD0d8B907BfBB4237F69147AcAEFBE2/balance
Response Body
{
"success": true,
"result": {
"available": true,
"secretType": "MATIC",
"balance": 0.009474999998803,
"gasBalance": 0.009474999998803,
"symbol": "POL",
"gasSymbol": "POL",
"rawBalance": "9474999998803000",
"rawGasBalance": "9474999998803000",
"decimals": 18,
"exchange": {
"usdPrice": 0.45456659517960074,
"usdBalanceValue": 0.0043070184887826005
}
}
}
Updated 11 days ago