Retrieve wallet balance

How to retrieve the native balance of a wallet

Get native balance by wallet id

GET https://api-wallet.venly.io/api/wallets/:walletId/balance

Path Parameters

NameTypeDescription

walletId*

string

ID of the wallet

{
    "success": true,
    "result": {
        "available": true,
        "secretType": "MATIC",
        "balance": 0.089979,
        "gasBalance": 0.089979,
        "symbol": "MATIC",
        "gasSymbol": "MATIC",
        "rawBalance": "89979000000000000",
        "rawGasBalance": "89979000000000000",
        "decimals": 18
    }
}

Get native balance by secret type and wallet address

GET https://api-wallet.venly.io/api/wallets/:secretType/:walletAddress/balance

Path Parameters

NameTypeDescription

secretType*

SecretType

Indication on which chain the balance should be fetched

walletAddress*

String

The address of the wallet

{
    "success": true,
    "result": {
        "available": true,
        "secretType": "MATIC",
        "balance": 6537.995854438881,
        "gasBalance": 6537.995854438881,
        "symbol": "MATIC",
        "gasSymbol": "MATIC",
        "rawBalance": "6537995854438880776000",
        "rawGasBalance": "6537995854438880776000",
        "decimals": 18
    }
}

Example

Response

{
    "success": true,
    "result": {
        "available": true,
        "secretType": "MATIC",
        "balance": 0.089979,
        "gasBalance": 0.089979,
        "symbol": "MATIC",
        "gasSymbol": "MATIC",
        "rawBalance": "89979000000000000",
        "rawGasBalance": "89979000000000000",
        "decimals": 18
    }
}

Last updated