Portfolio
/api/portfolio/update
Updates the target positions for an existing portfolio. Target positions define the desired allocation of tokens in the portfolio.
Allocation Rules
- Each
allocationvalue must be between0and1(representing 0% to 100%) - The sum of all allocations should equal
1(100%) - You can include 1-100 target positions (recommended to keep it under 30 positions for better UX)
Common Token Mints
| Token | Mint Address |
|---|---|
| SOL (Wrapped) | So11111111111111111111111111111111111111112 |
| AVO | GdZ9rwHyKcriLdbSzhtEFLe5MLs7Vk6AY1aE5ei7nsmP |
| INFRA | D1wZHkfk8d6QsCjF3NTiYHLzsZJ2Qb4Q7wBFFbGuzBLV |
Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
portfolio_id | string | Yes | The unique identifier of the portfolio to update. Example: 550e8400-e29b-41d4-a716-446655440000 |
target_positions | object[] | Yes | Array of target position allocations (1-100 items). Each object has mint (string) and allocation (number 0-1) |
POST
https://api.avo.so/api/portfolio/updateAuthorization:
portfolio_id*
target_positions*
1
2
3
curl -X POST "https://api.avo.so/api/portfolio/update" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"portfolio_id": "550e8400-e29b-41d4-a716-446655440000",
"target_positions": [
{
"mint": "So11111111111111111111111111111111111111112",
"allocation": 0.5
},
{
"mint": "GdZ9rwHyKcriLdbSzhtEFLe5MLs7Vk6AY1aE5ei7nsmP",
"allocation": 0.3
},
{
"mint": "D1wZHkfk8d6QsCjF3NTiYHLzsZJ2Qb4Q7wBFFbGuzBLV",
"allocation": 0.2
}
]
}'ResponsesPortfolio updated successfully
{
"success": true,
"message": "Portfolio target positions updated successfully"
}
