Portfolio
Access a per-asset overview of a single managed user's portfolio
For more inspiration, check out these recipes involving managed users
👥Register new managed userOpen Recipe
getPortfolioForUser(userId: string)**:
Account portfolio overview for a managed user
const userId = 'northstake_user_guuid'
const {body:portfolio} = await api.managedUsersPortfolio.getPortfolioForUser(userId)
for (const asset of portfolio) {
console.log(`
Asset: ${asset.asset}
Staked Amount: ${asset.stakedAmount}
Total Amount: ${asset.totalAmount}
`)
}
Updated 4 months ago