Skip to main content

Portfolio & Positions

This guide covers how to view your smart account portfolio and token positions.

Overview

After borrowing, your stablecoins are held in your smart account. The SDK provides methods to:
  • View token balances
  • Check portfolio value
  • Monitor position changes

Getting Wallet Positions

Filtering Positions

Position Data Structure

Getting Portfolio Summary

Portfolio Data Structure

Common Use Cases

Display Token Balances

Check Specific Token Balance

Calculate Total Portfolio Value

Monitor Position Changes

Error Handling

Complete Example

Best Practices

1. Cache Positions for UI

2. Filter Dust Tokens

3. Handle Missing Data

4. Format Numbers Appropriately