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

> Initiate a withdrawal of specific assets from a portfolio

Initiates a withdrawal of specific assets from a portfolio.

## ETH Mainnet Policy Limits (Effective March 2, 2026)

For ETH mainnet portfolios (`primary_chain_id = "1"`):

* Minimum withdrawal amount is `$10` USD.
* If selected withdrawal amount is below `$10`, request is allowed only when:
  * total portfolio value is below `$10`, and
  * selected withdrawal represents a full-balance withdrawal (within tolerance).

Deterministic rejection codes:

* `WITHDRAW_ETH_MAINNET_BELOW_MINIMUM`
* `WITHDRAW_ETH_MAINNET_FULL_REQUIRED_UNDER_MINIMUM`

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

<ParamField header="Content-Type" type="string" default="application/json">
  Application JSON content type (usually set automatically)
</ParamField>

## Request Body

<ParamField body="strategyInstanceId" type="string" required>
  The ID of the portfolio (same as portfolioId in path)
</ParamField>

<ParamField body="assets" type="object[]" required>
  Array of assets to withdraw
</ParamField>

<ParamField body="assets[].assetId" type="string" required>
  The asset ID in format "0xContractAddress:chainId" or "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:chainId" for native tokens
</ParamField>

<ParamField body="assets[].amount" type="string" required>
  The amount to withdraw in raw units (no decimals), or "max" to withdraw all
</ParamField>

<ParamField body="assets[].decimals" type="number" required>
  The number of decimals for the token
</ParamField>

<ParamField body="recipient" type="string">
  Optional address to receive the withdrawn assets (defaults to portfolio owner)
</ParamField>

<ParamField body="validateNonzeroBalance" type="boolean" default="false">
  If true, will validate that all specified assets have non-zero balances
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.glider.fi/v1/portfolio/port_abc123/withdraw' \
    --header 'Content-Type: application/json' \
    --header 'X-API-KEY: your_api_key_here' \
    --data '{
      "strategyInstanceId": "port_abc123",
      "assets": [
        {
          "assetId": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:8453",
          "amount": "50000000000000000",
          "decimals": 18
        }
      ]
    }'
  ```

  ```javascript JavaScript theme={null}
  const portfolioId = "port_abc123";
  const withdrawResponse = await fetch(
    `https://api.glider.fi/v1/portfolio/${portfolioId}/withdraw`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "X-API-KEY": "your_api_key_here",
      },
      body: JSON.stringify({
        strategyInstanceId: portfolioId,
        assets: [
          {
            assetId: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:8453", // ETH on Base
            amount: "50000000000000000", // 0.05 ETH in wei
            decimals: 18,
          },
        ],
      }),
    }
  );

  const withdrawResult = await withdrawResponse.json();
  console.log(`Withdraw workflow ID: ${withdrawResult.data.workflowId}`);
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "data": {
      "withdrawId": "withdraw_abc123",
      "workflowId": "withdraw_abc123",
      "runId": "run_def456",
      "message": "Withdraw request submitted successfully",
      "status": "submitted"
    },
    "correlationId": "corr_abc123",
    "requestId": "req_xyz789",
    "timestamp": "2023-05-21T13:45:12.345Z"
  }
  ```
</ResponseExample>

## Using Max Withdrawals

You can use `"max"` as the amount to withdraw the entire balance of an asset:

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.glider.fi/v1/portfolio/port_abc123/withdraw' \
    --header 'Content-Type: application/json' \
    --header 'X-API-KEY: your_api_key_here' \
    --data '{
      "strategyInstanceId": "port_abc123",
      "assets": [
        {
          "assetId": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:8453",
          "amount": "max",
          "decimals": 18
        }
      ],
      "validateNonzeroBalance": true
    }'
  ```

  ```javascript JavaScript theme={null}
  const portfolioId = "port_abc123";
  const withdrawMaxResponse = await fetch(
    `https://api.glider.fi/v1/portfolio/${portfolioId}/withdraw`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "X-API-KEY": "your_api_key_here",
      },
      body: JSON.stringify({
        strategyInstanceId: portfolioId,
        assets: [
          {
            assetId: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:8453", // ETH on Base
            amount: "max", // Withdraw all ETH
            decimals: 18,
          },
        ],
        validateNonzeroBalance: true // Will error if balance is zero
      }),
    }
  );

  const withdrawMaxResult = await withdrawMaxResponse.json();
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "data": {
      "withdrawId": "withdraw_def456",
      "workflowId": "withdraw_def456",
      "runId": "run_ghi789",
      "message": "Withdraw request submitted successfully",
      "status": "submitted"
    },
    "correlationId": "corr_abc123",
    "requestId": "req_xyz789",
    "timestamp": "2023-05-21T13:45:12.345Z"
  }
  ```
</ResponseExample>
