> ## 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 Performance

> Retrieve performance data for a portfolio over a specified time window

Retrieves performance data for a portfolio over a specified time window.

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

<ParamField query="timeWindow" type="string" default="7d">
  The time window for performance data (e.g., "1d", "7d", "30d", "90d", "all")
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.glider.fi/v1/portfolio/port_abc123/performance?timeWindow=30d' \
    --header 'X-API-KEY: your_api_key_here'
  ```

  ```javascript JavaScript theme={null}
  const portfolioId = "port_abc123";
  const response = await fetch(
    `https://api.glider.fi/v1/portfolio/${portfolioId}/performance?timeWindow=30d`,
    {
      method: "GET",
      headers: {
        "X-API-KEY": "your_api_key_here",
      },
    }
  );

  const performance = await response.json();
  console.log(`30-day return: ${performance.data.changePercent}%`);
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "data": {
      "portfolioId": "port_abc123",
      "timeWindow": "30d",
      "startValue": "950.00",
      "currentValue": "1053.75",
      "change": "103.75",
      "changePercent": "10.92",
      "startDate": "2023-04-21T13:45:12.345Z",
      "data": [
        {
          "timestamp": "2023-04-21T13:45:12.345Z",
          "value": "950.00"
        },
        {
          "timestamp": "2023-04-28T13:45:12.345Z",
          "value": "975.50"
        },
        {
          "timestamp": "2023-05-05T13:45:12.345Z",
          "value": "990.25"
        },
        {
          "timestamp": "2023-05-12T13:45:12.345Z",
          "value": "1020.15"
        },
        {
          "timestamp": "2023-05-19T13:45:12.345Z",
          "value": "1045.30"
        },
        {
          "timestamp": "2023-05-21T13:45:12.345Z",
          "value": "1053.75"
        }
      ]
    },
    "correlationId": "corr_abc123",
    "requestId": "req_xyz789",
    "timestamp": "2023-05-21T13:45:12.345Z"
  }
  ```
</ResponseExample>
