> ## 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 Rebalance Status

> Check the status of portfolio rebalancing

Checks the status of portfolio rebalancing.

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

<ParamField query="limit" type="number" default="5">
  Number of recent workflows to return
</ParamField>

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

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

  ```javascript JavaScript theme={null}
  const portfolioId = "port_abc123";
  const rebalanceStatusResponse = await fetch(
    `https://api.glider.fi/v1/portfolio/${portfolioId}/rebalance/status?limit=5`,
    {
      method: "GET",
      headers: {
        "X-API-KEY": "your_api_key_here",
      },
    }
  );

  const rebalanceStatus = await rebalanceStatusResponse.json();
  console.log(`Rebalance status: ${rebalanceStatus.data.status}`);
  console.log(`Recent workflows: ${rebalanceStatus.data.recentWorkflows.length}`);
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "data": {
      "portfolioId": "port_abc123",
      "status": "active", // or "paused", "inactive", "error"
      "message": "Rebalance schedule is active",
      "rebalanceScheduleId": "sched_abc123",
      "details": {
        "totalExecutions": 5,
        "paused": false,
        "pauseReason": null,
        "nextScheduledExecution": "2023-05-21T19:30:00.000Z"
      },
      "recentWorkflows": [
        {
          "workflowId": "rebal_def456",
          "runId": "run_jkl012",
          "scheduledAt": "2023-05-21T13:30:00.000Z",
          "startedAt": "2023-05-21T13:30:00.123Z",
          "status": "triggered"
        },
        {
          "workflowId": "rebal_ghi789",
          "runId": "run_mno345",
          "scheduledAt": "2023-05-21T07:30:00.000Z",
          "startedAt": "2023-05-21T07:30:00.456Z",
          "status": "triggered"
        }
      ]
    },
    "correlationId": "corr_abc123",
    "requestId": "req_xyz789",
    "timestamp": "2023-05-21T13:45:12.345Z"
  }
  ```
</ResponseExample>
