Deposit With Approval

Returns unsigned transactions for ERC-20 approval when allowance is below the deposit amount, plus the protocol deposit transaction. Without batchOption, data is an ordered array [approveTxn?, depositTxn]. With batchOption EIP-5792 or EIP-7702 (supported chains), returns a single batched payload. Same request parameters as Deposit per protocol.

Compute Unit Value: 230 (Fixed)

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

The request body for a /defi/v1/lendborrow/deposit-with-approval

string
enum

The unique ID to specify the lending and borrowing protocol for routing relevant queries or transactions.

string

Token address of the asset to deposit.

string
required

Number of tokens to deposit.

string
required

Public address of the user on whose behalf the deposit action will be executed.

string
required

Sender's public address.

string

Maximum gas to be approved for the transaction.

string

Specifies the priority level for gas fees (e.g., 'low', 'medium', or 'high'), which influences the transaction speed and cost.

boolean

Flag to include a basis points fee transaction alongside the main transaction when set to true.

string
enum

The batch option to be used for the transaction.

Allowed:
string

The EOA address of the batcher that will be used to execute the transaction when using EIP-7702 batching. If not provided, the default batcher contract for the chain will be used.

boolean

A boolean flag to scope the API request. If true, the request will be processed using the partner's dedicated vaults. If false or omitted, it uses the standard public pools.

string

Receiver's public address.

string

The market of the asset, such as USDC or WETH. Defaults to USDC.

string

Specifies the market Id of any market in Morpho.

string

Specifies the vaultAddress of any vault in Morpho.

boolean

Specifies the condition for depositing the token as a supply to earn the yields only or use it as collateral to borrow loan asset.

Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json