Last updated 2 days ago
Retrieves your wallet's current balance using the . The HIN parameter is required to uniquely identify your wallet. Note: Assets with a balance of 0 will not be returned.
import { hibitClient } from '@delandlabs/hibit-sdk'; const options = { network: HibitNetwork.Testnet, hin: 10000n }; hibitClient.setOptions(options); const balances = await hibitClient.getWalletBalances({ hin: options.hin });
Source code
HIN, hibit chain identity number
Asset Id (optional), if not provided, return all assets
GET /v1/wallet/balances HTTP/1.1 Host: testnetopenapi.hibit.app Accept: */*
OK
{ "code": 1, "message": "text", "data": { "ANY_ADDITIONAL_PROPERTY": "text" } }