Create a plan to open or increase a leveraged long position
| Parameter | Type | Description |
|---|---|---|
account_id | string | The sub-account ID |
| Parameter | Type | Required | Description |
|---|---|---|---|
exposure_asset | string | Yes | Asset to go long on (e.g., "WETH") |
backing_asset | string | Yes | Asset used as loan currency (e.g., "USDC") |
market_id | string | Yes | Morpho market ID (0x-prefixed 32-byte hex) |
is_increase | boolean | Yes | true to open/increase position, false to adjust existing |
exposure_amount | string | Yes | Target exposure amount in the asset’s smallest unit |
max_swap_backing_amount | string | Yes | Maximum backing asset to use in swaps |
max_provided_backing_amount | string | Yes | Maximum backing asset to supply as collateral |
pool_fee | integer | Yes | Uniswap pool fee tier (e.g., 500, 3000, 10000) |
network | string | Yes | Target network (e.g., "base", "mainnet"). Funds on other chains are bridged automatically. |
| 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 |
| 400 | no_wallet | Account has no wallets |
| 408 | timeout | Folio computation timed out |
market_id must be a valid Morpho market ID (0x-prefixed 32-byte hex).pool_fee values: 500 (0.05%), 3000 (0.3%), 10000 (1%). These correspond to Uniswap V3 fee tiers.