> ## Documentation Index
> Fetch the complete documentation index at: https://docs.glider.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Portfolio Get

> Retrieve detailed information about a specific portfolio

Retrieves detailed information about a specific portfolio, including assets, activity, and performance data.

## Path Parameters

<ParamField path="portfolioId" type="string" required>
  The unique identifier of the portfolio
</ParamField>

## Request Headers

<ParamField header="X-API-KEY" type="string" required>
  Your API key
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url '/v1/portfolio/port_abc123' \
    --header 'X-API-KEY: your_api_key_here'
  ```

  ```javascript JavaScript theme={null}
  const portfolioId = "port_abc123";
  const response = await fetch(
    `/v1/portfolio/${portfolioId}`,
    {
      method: "GET",
      headers: {
        "X-API-KEY": "your_api_key_here",
      },
    }
  );

  const portfolio = await response.json();
  console.log(`Portfolio name: ${portfolio.data.name}`);
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "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"
  }
  ```
</ResponseExample>
