Skip to main content
The toolkit provides method:
  • getWalletHolding: Check balances your own wallet

Usage

Parameters

No

Example Prompts

Natural Language Prompts

Example Implementation

Implementation Details

  • Returns balances in UI units (e.g., 0.1 SUI)
  • Returns 0 for non-existent token

Error Handling

  • Invalid privateKey
  • Empty wallet

Best Practices

  1. Error Handling
  • Handle non-existent tokens gracefully
  • Validate addresses before querying
  • Consider caching for frequent checks
  1. Performance
  • Batch balance checks when possible
  • Cache results for short periods
  1. UI Display
  • Format numbers appropriately
  • Show proper decimal places
  • Include token symbols