Create a plan to remove collateral from a Morpho position
| Parameter | Type | Description |
|---|---|---|
account_id | string | The sub-account ID |
| Parameter | Type | Required | Description |
|---|---|---|---|
exposure_asset | string | Yes | The position’s exposure asset (e.g., "WETH") |
backing_asset | string | Yes | The backing/collateral asset (e.g., "USDC") |
market_id | string | Yes | Morpho market ID (0x-prefixed 32-byte hex) |
amount | string | Yes | Amount of backing asset to withdraw in its smallest unit |
is_short | boolean | Yes | true if this is a short position, false for long |
network | string | Yes | Network name (e.g., "base", "mainnet") |
| Field | Type | Description |
|---|---|---|
plan_id | string | Unique identifier for this plan (pln_ prefix) |
details | object | Transaction details including EIP-712 signing data |
details.eip712_data.digest | string | The hash to sign with the account’s signer key |
expires_at | string | ISO 8601 timestamp — plan must be executed before this time |
| Status | Code | Description |
|---|---|---|
| 400 | invalid_params | Missing required parameters or invalid market ID |
| 400 | plan_failed | Could not generate a valid plan (e.g., withdrawal would liquidate position) |
| 400 | no_wallet | Account has no wallets |
| 408 | timeout | Folio computation timed out |
market_id must match the Morpho market of the existing position.