Initiates a withdrawal of specific assets from a portfolio.
Path Parameters
The unique identifier of the portfolio
Content-Type
string
default:"application/json"
Application JSON content type (usually set automatically)
Request Body
The ID of the portfolio (same as portfolioId in path)
Array of assets to withdraw
The asset ID in format “0xContractAddress:chainId” or “0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:chainId” for native tokens
The amount to withdraw in raw units (no decimals), or “max” to withdraw all
The number of decimals for the token
Optional address to receive the withdrawn assets (defaults to portfolio owner)
If true, will validate that all specified assets have non-zero balances
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
}
]
}'
{
"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"
}
Using Max Withdrawals
You can use "max"
as the amount to withdraw the entire balance of an asset:
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
}'
{
"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"
}