POST /v1/operations/unwind — Plan an unwind operation
POST https://api.rebelfi.io/v1/operations/unwind| Field | Type | Required | Description |
|---|---|---|---|
walletAddress | string | One of | Wallet address |
walletId | number | One of | Wallet ID from registration |
strategyId | number | Yes | Strategy ID to unwind from |
amount | string | One of | Amount to unwind in base units. Required unless fullWithdrawal is true. |
fullWithdrawal | boolean | One of | If true, withdraws the full position using the protocol’s native max-withdrawal mechanism. Cannot be combined with amount. |
| Code | Description |
|---|---|
INVALID_AMOUNT | Amount is zero, negative, or malformed |
ALLOCATION_NOT_FOUND | No position exists at this strategy |
INSUFFICIENT_BALANCE | Amount exceeds allocation |
STRATEGY_NOT_FOUND | Strategy ID doesn’t exist |
INSUFFICIENT_GAS | Not enough SOL for transaction fee |
OPERATION_IN_PROGRESS | Another operation is currently executing for this wallet |
WALLET_NOT_FOUND | Wallet ID doesn’t exist |