PUT
/
v1
/
portfolio
/
:portfolioId
curl --request PUT \
  --url '/v1/portfolio/port_abc123' \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: your_api_key_here' \
  --data '{
    "templateData": {
      "name": "Updated 70/30 ETH-USDC Portfolio",
      "description": "A simple portfolio with 70% ETH and 30% USDC allocation",
      "entry": {
        "blockType": "weight",
        "weightType": "specified-percentage",
        "weightings": ["70", "30"],
        "children": [
          {
            "blockType": "asset",
            "assetId": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:8453"
          },
          {
            "blockType": "asset",
            "assetId": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913:8453"
          }
        ]
      },
      "tradingSettings": {
        "type": "threshold",
        "triggerPercentage": 5
      }
    }
  }'
{
  "success": true,
  "data": {
    "portfolioId": "port_abc123",
    "message": "Portfolio template updated successfully",
    "httpMethod": "PUT",
    "blueprint": {
      "blueprintId": "tmpl_xyz789",
      "editId": "edit_abc123",
      "version": 2,
      "name": "Updated 70/30 ETH-USDC Portfolio"
    }
  },
  "correlationId": "corr_abc123",
  "requestId": "req_xyz789",
  "timestamp": "2023-05-21T13:45:12.345Z"
}

Updates a portfolio’s template data (asset allocations, trading settings, etc.). Both PUT and POST methods are supported.

portfolioId
string
required

The unique identifier of the portfolio

templateData
object
required

The portfolio template data

templateData.name
string

The name of the portfolio

templateData.description
string

The description of the portfolio

templateData.entry
object
required

The root entry point for the portfolio template structure

templateData.tradingSettings
object

Settings that control how and when the portfolio is rebalanced

curl --request PUT \
  --url '/v1/portfolio/port_abc123' \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: your_api_key_here' \
  --data '{
    "templateData": {
      "name": "Updated 70/30 ETH-USDC Portfolio",
      "description": "A simple portfolio with 70% ETH and 30% USDC allocation",
      "entry": {
        "blockType": "weight",
        "weightType": "specified-percentage",
        "weightings": ["70", "30"],
        "children": [
          {
            "blockType": "asset",
            "assetId": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:8453"
          },
          {
            "blockType": "asset",
            "assetId": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913:8453"
          }
        ]
      },
      "tradingSettings": {
        "type": "threshold",
        "triggerPercentage": 5
      }
    }
  }'
{
  "success": true,
  "data": {
    "portfolioId": "port_abc123",
    "message": "Portfolio template updated successfully",
    "httpMethod": "PUT",
    "blueprint": {
      "blueprintId": "tmpl_xyz789",
      "editId": "edit_abc123",
      "version": 2,
      "name": "Updated 70/30 ETH-USDC Portfolio"
    }
  },
  "correlationId": "corr_abc123",
  "requestId": "req_xyz789",
  "timestamp": "2023-05-21T13:45:12.345Z"
}