Recommended: JavaScript SDK with React Hooks
For new React apps, we recommend the JavaScript SDK with React Hooks (
@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.React
marketValue (USD value) and price (USD per unit), so the total portfolio value is the sum of marketValue across tokens:
React
Native asset balance
getBalance returns the native asset only (for example ETH on Ethereum, SOL on Solana) for the wallet’s active network. For total portfolio value across tokens and chains, use useMultichainTokenBalances above.getBalance method from the wallet connector via useDynamicContext.
React