getBalance
Query your balances on Akashic
Example
const balances = await akashicPay.getBalance();$balances = akashicPay->getBalance();APBalanceResult balances = akashicPay.getBalance(l2Address);var balance = await akashicPay.GetBalanceAsync();bal, err := ap.GetBalance()Return Example
Returns an array of objects, one for each native currency and one for each token with a non-zero balance. In the example below the caller has no USDT balance of ETH, hence there is no object for that instance.
Note: An object is always returned for native currencies. Tokens are only shown if you posses a non-zero amount.
[
{
"coinSymbol": NetworkSymbol.Ethereum_Sepolia,
"balance": "5.000000000000000000"
},
{
"coinSymbol": NetworkSymbol.Tron_Shasta,
"balance": "34.000000"
},
{
"coinSymbol": NetworkSymbol.Tron_Shasta,
"tokenSymbol": TokenSymbol.USDT,
"balance": "100.500000"
},
][
{
"coinSymbol": NetworkSymbol::ETHEREUM_SEPOLIA,
"balance": "5.000000000000000000"
},
{
"coinSymbol": NetworkSymbol::TRON_SHASTA,
"balance": "34.000000"
},
{
"coinSymbol": NetworkSymbol::TRON_SHASTA,
"tokenSymbol": TokenSymbol::USDT,
"balance": "100.500000"
},
]Last updated
Was this helpful?