These endpoints allow you to archive and unarchive portfolios. Archiving a portfolio pauses rebalance schedules and blocks archive-gated portfolio actions, while still allowing users to withdraw funds manually.
Archive a Portfolio
POST /portfolio/:portfolioId/archive
Archives a portfolio, pausing rebalance schedules and blocking archive-gated portfolio actions.
Path Parameters
The unique identifier of the portfolio to archive
Must be set to application/json
Request Body
Reason for archiving the portfolio (optional)
Response
Indicates if the request was successful
The archived portfolio information Timestamp when the portfolio was archived
Identifier of the entity that archived the portfolio
Reason provided for archiving
Unarchive a Portfolio
POST /portfolio/:portfolioId/unarchive
Unarchives a previously archived portfolio, restoring archive-gated portfolio actions.
Path Parameters
The unique identifier of the portfolio to unarchive
Must be set to application/json
Request Body
Whether to resume previous rebalance schedules
Response
Indicates if the request was successful
The unarchived portfolio information Timestamp when the portfolio was unarchived
Identifier of the entity that unarchived the portfolio
Information about rebalance schedules (if resumeSchedules=true)
Example Archive Request
curl -X POST "https://api.glider.fi/portfolio/port_1a2b3c4d5e6f/archive" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "No longer in use"
}'
Example Archive Response
{
"success" : true ,
"data" : {
"portfolio" : {
"id" : "port_1a2b3c4d5e6f" ,
"status" : "archived" ,
"archivedAt" : "2023-05-15T14:30:00Z" ,
"archivedBy" : "api_user_123" ,
"archiveReason" : "No longer in use"
}
}
}
Example Unarchive Request
curl -X POST "https://api.glider.fi/portfolio/port_1a2b3c4d5e6f/unarchive" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"resumeSchedules": true
}'
Example Unarchive Response
{
"success" : true ,
"data" : {
"portfolio" : {
"id" : "port_1a2b3c4d5e6f" ,
"status" : "active" ,
"unarchivedAt" : "2023-05-20T09:15:00Z" ,
"unarchivedBy" : "api_user_123" ,
"schedules" : [
{
"id" : "sched_1a2b3c4d" ,
"type" : "threshold" ,
"status" : "active"
}
]
}
}
}
Error Codes
The specified portfolio could not be found
Invalid or missing API key
The API key does not have permission to manage this portfolio
The portfolio is already in the requested state (e.g., archiving an already archived portfolio)
Notes
Archiving a portfolio is a non-destructive action - no data or assets are removed
All active rebalance schedules are automatically paused when a portfolio is archived
When unarchiving, you can choose whether to resume previous rebalance schedules
While archived, withdrawals remain available, but archive-gated actions like rebalancing and portfolio updates remain blocked
Portfolio data remains accessible for reporting and historical analysis
The archive reason is stored for audit and reporting purposes