Developers
BUILD ON THE PORTFOLIO LAYER.
Interfaces for creating portfolios, reading NAV and allocation state, positions, and rebalancing history.
Create Portfolio
const portfolio = await diversa.portfolio.create({
assets: ['BTC', 'ETH', 'USDC', 'WETH'],
allocations: [35, 30, 20, 15],
rebalance: {
model: 'threshold',
threshold: 0.05
}
})Read NAV
const nav = await diversa.portfolio.nav('0xportfolio-address')
// → { nav: '1.0842', totalValue: '8420281', supply: '7760000' }Read Allocation
const allocation = await diversa.portfolio.allocation('0xportfolio-address')
// → [{ symbol: 'BTC', target: 35, current: 38.2 }, ...]Read Portfolio Position
const position = await diversa.positions.of(walletAddress)
// → [{ portfolio: '0x…', balance: '1250.4', value: '1355.6' }]Read Rebalance History
const events = await diversa.portfolio.rebalances('0xportfolio-address', {
limit: 20
})Interface previews for illustration — endpoints and contracts shown are demo references, not live services.