Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.particle.network/llms.txt

Use this file to discover all available pages before exploring further.

Universal Accounts can hold all assets across supported chains.
Among these, Primary Assets are special: they have the deepest liquidity and can be used as the basis for cross-chain swaps, liquidity routing, and gas payments.
Why this matters: You can give users a single, unified balance of these spendable assets—regardless of which chain they’re actually on.
The full list of supported Primary Assets is available on the Supported chains and Primary Assets page.

Fetch Unified Balance (quick way)

The easiest way to display the maximum amount a user can spend in one go (the sum of their Primary Assets across chains) is by fetching their Unified Balance:
const primaryAssets = await ua.getPrimaryAssets();
console.log("Unified Balance:", primaryAssets.totalAmountInUSD);
This gives you a single number (totalAmountInUSD) that represents the cross-chain total balance of Primary Assets in USD.

Inspect Primary Assets in Detail

If you need more than just the total, getPrimaryAssets() also returns a detailed list of assets:
const primaryAssets = await ua.getPrimaryAssets();
console.log("Primary Assets:", JSON.stringify(primaryAssets, null, 2));
The following is the structure of the response:
{
  assets: AssetInfo[],       // assets breakdown (per-token and chain)
  totalAmountInUSD: number   // unified total
}
Each AssetInfo entry aggregates a token across chains, including per-chain breakdowns.
FieldDescription
tokenTypeToken identifier (e.g., “eth”, “usdt”)
priceCurrent USD price
amountTotal amount across chains (human-readable)
amountInUSDTotal USD value
chainAggregationPer-chain balance breakdowns

chainAggregation format

Each chainAggregation entry details the balance and metadata of the token on a specific chain:
FieldDescription
token.chainIdChain ID
token.addressToken contract address
amountToken amount (human-readable float)
amountInUSDUSD value
rawAmountToken amount in raw units (integer, stringified)
token.decimalsERC-20 decimals
token.realDecimalsAdjusted decimals for display
token.isMultiChainPart of multi-chain registry
token.isMultiChainDefaultDefault canonical version across chains
For native assets like ETH, the token.address field will be 0x0000000000000000000000000000000000000000.

Fetch Primary Assets in a Sample App

See how to call getPrimaryAssets() in a real Next.js app using Particle Auth and Universal Accounts.

Parse and Display Asset Balances

Check out how Primary Asset data is parsed and rendered in this sample app.

Next steps

Build a balance widget

Step-by-step guide to rendering a unified balance in your UI.

Transaction History

Fetch a user’s past transactions.