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"
}
Update a portfolio’s template data
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"
}
PUT
and POST
methods are supported.
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"
}