AVO Logo
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 allocation value must be between 0 and 1 (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

TokenMint Address
SOL (Wrapped)So11111111111111111111111111111111111111112
AVOGdZ9rwHyKcriLdbSzhtEFLe5MLs7Vk6AY1aE5ei7nsmP
INFRAD1wZHkfk8d6QsCjF3NTiYHLzsZJ2Qb4Q7wBFFbGuzBLV

Body Parameters

FieldTypeRequiredDescription
portfolio_idstringYesThe unique identifier of the portfolio to update. Example: 550e8400-e29b-41d4-a716-446655440000
target_positionsobject[]YesArray of target position allocations (1-100 items). Each object has mint (string) and allocation (number 0-1)
POSThttps://api.avo.so/api/portfolio/update
Authorization:
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"
}