curl --request GET \
  --url '/v1/portfolios?userAddress=0xYourWalletAddress&limit=10&offset=0&sort=created_at&order=desc' \
  --header 'X-API-KEY: your_api_key_here'
{
  "success": true,
  "data": {
    "portfolios": [
      {
        "id": "port_abc123",
        "name": "70/30 ETH-USDC Portfolio",
        "description": "A simple portfolio with 70% ETH and 30% USDC allocation",
        "ownerAddress": "0xUserWalletAddress",
        "isPublic": false,
        "isArchived": false,
        "createdAt": "2023-05-21T12:34:56.789Z",
        "updatedAt": "2023-05-21T13:45:12.345Z",
        "tags": ["api-created"],
        "templateId": "tmpl_xyz789",
        "valueUsd": "1053.75",
        "vaults": [
          {
            "chainId": "8453",
            "address": "0xPortfolioVaultAddress",
            "assets": [
              {
                "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                "chainId": 8453,
                "decimals": 18,
                "symbol": "ETH",
                "name": "Ethereum",
                "logoURI": "https://assets.glider.fi/icons/eth.png",
                "assetId": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:8453",
                "totalBalance": "0.5",
                "baseTokenBalance": "0.5",
                "priceUSD": "1500",
                "amount": "0.5",
                "rawAmount": "500000000000000000"
              },
              {
                "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "chainId": 8453,
                "decimals": 6,
                "symbol": "USDC",
                "name": "USD Coin",
                "logoURI": "https://assets.glider.fi/icons/usdc.png",
                "assetId": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913:8453",
                "totalBalance": "300",
                "baseTokenBalance": "300",
                "priceUSD": "1",
                "amount": "300",
                "rawAmount": "300000000"
              }
            ]
          }
        ]
      }
    ],
    "pagination": {
      "total": 1,
      "limit": 10,
      "offset": 0,
      "hasMore": false
    }
  },
  "correlationId": "corr_abc123",
  "requestId": "req_xyz789",
  "timestamp": "2023-05-21T12:34:56.789Z"
}
The Portfolio Management endpoints allow you to list, retrieve, and manage portfolios.

List All Portfolios

userAddress
string
Filter portfolios by owner Ethereum address
portfolioId
string
Filter by portfolio ID
portfolioAddress
string
Filter by portfolio vault address
portfolioChainId
string
Filter by portfolio vault chain ID
isArchived
boolean
Filter for archived (true) or active (false) portfolios
hasAutomation
boolean
Filter for portfolios with automation enabled
limit
number
default:"20"
Number of results to return
offset
number
default:"0"
Pagination offset
sort
string
default:"created_at"
Sort field (options: created_at, updated_at, name)
order
string
default:"desc"
Sort order (options: asc, desc)
Text search term
chainId
string
Filter by chain ID
tag
string
Filter by portfolio tag
includeAssets
boolean
default:"true"
Include detailed asset data
realtime
boolean
default:"false"
Use real-time blockchain data instead of cached data
curl --request GET \
  --url '/v1/portfolios?userAddress=0xYourWalletAddress&limit=10&offset=0&sort=created_at&order=desc' \
  --header 'X-API-KEY: your_api_key_here'
{
  "success": true,
  "data": {
    "portfolios": [
      {
        "id": "port_abc123",
        "name": "70/30 ETH-USDC Portfolio",
        "description": "A simple portfolio with 70% ETH and 30% USDC allocation",
        "ownerAddress": "0xUserWalletAddress",
        "isPublic": false,
        "isArchived": false,
        "createdAt": "2023-05-21T12:34:56.789Z",
        "updatedAt": "2023-05-21T13:45:12.345Z",
        "tags": ["api-created"],
        "templateId": "tmpl_xyz789",
        "valueUsd": "1053.75",
        "vaults": [
          {
            "chainId": "8453",
            "address": "0xPortfolioVaultAddress",
            "assets": [
              {
                "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                "chainId": 8453,
                "decimals": 18,
                "symbol": "ETH",
                "name": "Ethereum",
                "logoURI": "https://assets.glider.fi/icons/eth.png",
                "assetId": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:8453",
                "totalBalance": "0.5",
                "baseTokenBalance": "0.5",
                "priceUSD": "1500",
                "amount": "0.5",
                "rawAmount": "500000000000000000"
              },
              {
                "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "chainId": 8453,
                "decimals": 6,
                "symbol": "USDC",
                "name": "USD Coin",
                "logoURI": "https://assets.glider.fi/icons/usdc.png",
                "assetId": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913:8453",
                "totalBalance": "300",
                "baseTokenBalance": "300",
                "priceUSD": "1",
                "amount": "300",
                "rawAmount": "300000000"
              }
            ]
          }
        ]
      }
    ],
    "pagination": {
      "total": 1,
      "limit": 10,
      "offset": 0,
      "hasMore": false
    }
  },
  "correlationId": "corr_abc123",
  "requestId": "req_xyz789",
  "timestamp": "2023-05-21T12:34:56.789Z"
}

Get Portfolio by ID

Retrieves detailed information about a specific portfolio, including assets, activity, and performance data.
portfolioId
string
required
The unique identifier of the portfolio
curl --request GET \
  --url '/v1/portfolio/port_abc123' \
  --header 'X-API-KEY: your_api_key_here'
{
  "success": true,
  "data": {
    "id": "port_abc123",
    "name": "70/30 ETH-USDC Portfolio",
    "description": "A simple portfolio with 70% ETH and 30% USDC allocation",
    "ownerAddress": "0xUserWalletAddress",
    "isPublic": false,
    "isArchived": false,
    "createdAt": "2023-05-21T12:34:56.789Z",
    "updatedAt": "2023-05-21T13:45:12.345Z",
    "tags": ["api-created"],
    "templateId": "tmpl_xyz789",
    "valueUsd": "1053.75",
    "template": {
      "entry": {
        "blockType": "weight",
        "weightType": "specified-percentage",
        "weightings": ["70", "30"],
        "children": [
          {
            "blockType": "asset",
            "assetId": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:8453"
          },
          {
            "blockType": "asset",
            "assetId": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913:8453"
          }
        ]
      }
    },
    "vaults": [
      {
        "chainId": "8453",
        "address": "0xPortfolioVaultAddress",
        "assets": [
          {
            "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
            "chainId": 8453,
            "decimals": 18,
            "symbol": "ETH",
            "name": "Ethereum",
            "logoURI": "https://assets.glider.fi/icons/eth.png",
            "assetId": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:8453",
            "totalBalance": "0.5",
            "baseTokenBalance": "0.5",
            "priceUSD": "1500",
            "amount": "0.5",
            "rawAmount": "500000000000000000"
          },
          {
            "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
            "chainId": 8453,
            "decimals": 6,
            "symbol": "USDC",
            "name": "USD Coin",
            "logoURI": "https://assets.glider.fi/icons/usdc.png",
            "assetId": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913:8453",
            "totalBalance": "300",
            "baseTokenBalance": "300",
            "priceUSD": "1",
            "amount": "300",
            "rawAmount": "300000000"
          }
        ]
      }
    ],
    "metadata": {
      "isPublic": false,
      "created": "2023-05-21T12:34:56.789Z",
      "lastUpdated": "2023-05-21T13:45:12.345Z",
      "templateId": "tmpl_xyz789",
      "mirrored": false,
      "rebalanceScheduleId": "sched_abc123"
    },
    "portfolioId": "port_abc123",
    "owner": "0xUserWalletAddress",
    "costBasisAssets": [
      {
        "assetId": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:8453",
        "symbol": "ETH",
        "totalAcquired": "0.6",
        "totalDisposed": "0.1",
        "currentAmount": "0.5",
        "averageCostBasis": "1450.00",
        "realizedPnL": "5.00",
        "unrealizedPnL": "25.00"
      },
      {
        "assetId": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913:8453",
        "symbol": "USDC",
        "totalAcquired": "500",
        "totalDisposed": "200",
        "currentAmount": "300",
        "averageCostBasis": "1.00",
        "realizedPnL": "0.00",
        "unrealizedPnL": "0.00"
      }
    ],
    "costBasisSummary": {
      "totalCostBasis": "1170.00",
      "totalRealizedPnL": "5.00",
      "totalUnrealizedPnL": "25.00",
      "totalPositions": 2
    },
    "trades": [
      {
        "tradeDirection": "buy",
        "timestamp": "2023-05-21T12:55:32.123Z",
        "totalProfitLossUsd": "0.00",
        "totalProfitLossPercent": 0,
        "totalSellValueUsd": "50.00",
        "totalBuyValueUsd": "50.00",
        "swaps": [
          {
            "type": "fromToken",
            "amount": "50",
            "symbol": "USDC",
            "valueUsd": "50.00"
          },
          {
            "type": "toToken",
            "amount": "0.033333",
            "symbol": "ETH",
            "valueUsd": "50.00"
          }
        ]
      }
    ],
    "activity": [
      {
        "id": "act_abc123",
        "type": "deposit",
        "assetId": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:8453",
        "symbol": "ETH",
        "decimals": 18,
        "amount": "0.5",
        "rawAmount": "500000000000000000",
        "priceUsd": "1500",
        "valueUsd": "750.00",
        "txHash": "0xTransactionHash123",
        "chainId": 8453,
        "blockNumber": 12345678,
        "timestamp": "2023-05-21T12:34:56.789Z"
      },
      {
        "id": "act_def456",
        "type": "deposit",
        "assetId": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913:8453",
        "symbol": "USDC",
        "decimals": 6,
        "amount": "300",
        "rawAmount": "300000000",
        "priceUsd": "1",
        "valueUsd": "300.00",
        "txHash": "0xTransactionHash456",
        "chainId": 8453,
        "blockNumber": 12345679,
        "timestamp": "2023-05-21T12:40:12.345Z"
      }
    ]
  },
  "correlationId": "corr_abc123",
  "requestId": "req_xyz789",
  "timestamp": "2023-05-21T12:34:56.789Z"
}

Update Portfolio

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"
}

List Portfolios by Owner

ownerAddress
string
required
The Ethereum address of the portfolio owner
isArchived
boolean
Filter for archived (true) or active (false) portfolios
limit
number
default:"100"
Number of results to return
offset
number
default:"0"
Pagination offset
sort
string
default:"created_at"
Sort field (options: created_at, updated_at, name)
order
string
default:"desc"
Sort order (options: asc, desc)
includeAssets
boolean
default:"true"
Include detailed asset data
curl --request GET \
  --url '/v1/portfolios/by-owner?ownerAddress=0xYourWalletAddress&limit=10&offset=0' \
  --header 'X-API-KEY: your_api_key_here'
{
  "success": true,
  "data": {
    "ownerAddress": "0xYourWalletAddress",
    "portfolios": [
      {
        "id": "port_abc123",
        "name": "70/30 ETH-USDC Portfolio",
        "description": "A simple portfolio with 70% ETH and 30% USDC allocation",
        "ownerAddress": "0xYourWalletAddress",
        "managedByTenantId": "tenant_xyz789",
        "isPublic": false,
        "isArchived": false,
        "createdAt": "2023-05-21T12:34:56.789Z",
        "updatedAt": "2023-05-21T13:45:12.345Z",
        "tags": ["api-created"],
        "blueprintId": "tmpl_xyz789",
        "automation": {
          "status": "active",
          "hasAutomation": true
        },
        "valueUsd": "1053.75",
        "vaults": [
          {
            "chainId": "8453",
            "address": "0xPortfolioVaultAddress",
            "assets": [
              {
                "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                "chainId": 8453,
                "decimals": 18,
                "symbol": "ETH",
                "name": "Ethereum",
                "logoURI": "https://assets.glider.fi/icons/eth.png",
                "assetId": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:8453",
                "totalBalance": "0.5",
                "baseTokenBalance": "0.5",
                "priceUSD": "1500",
                "amount": "0.5",
                "rawAmount": "500000000000000000"
              },
              {
                "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "chainId": 8453,
                "decimals": 6,
                "symbol": "USDC",
                "name": "USD Coin",
                "logoURI": "https://assets.glider.fi/icons/usdc.png",
                "assetId": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913:8453",
                "totalBalance": "300",
                "baseTokenBalance": "300",
                "priceUSD": "1",
                "amount": "300",
                "rawAmount": "300000000"
              }
            ]
          }
        ]
      }
    ],
    "pagination": {
      "total": 1,
      "limit": 10,
      "offset": 0,
      "hasMore": false
    }
  },
  "correlationId": "corr_abc123",
  "requestId": "req_xyz789",
  "timestamp": "2023-05-21T12:34:56.789Z"
}