Skip to main content

ThirdwebSDK.getBalance() method

Get the native balance of a given address (wallet or contract)

Example

const balance = await sdk.getBalance("0x...");
console.log(balance.displayValue);

Signature:

getBalance(address: string): Promise<CurrencyValue>;

Parameters

ParameterTypeDescription
addressstringthe address to check the balance for

Returns:

Promise<CurrencyValue>