API Reference
Borrow
Build an unsigned, atomic transaction batch that borrows from a Morpho Blue market on Base, optionally adding collateral in the same batch.
Launch preview. See Morpho Borrow for market selection, fees, and repayment.
Body Parameters
string
required
The wallet that owns the position, executes the batch and receives the net proceeds.
string
required
The supported Morpho Blue product on Base, as a canonical UUID.
string
required
The selected product’s loan-asset identifier.
string
required
The amount the user receives, in loan-token atomic units. Minimum 400 atomic units; net amount plus fee must fit in
uint256.string
required
Your app’s registered builder code.
string
The selected product’s collateral-asset identifier. Must be paired with
collateralAmount.string
Collateral to add, in that token’s atomic units. Must be paired with
collateralMarketAssetId.Borrow Against Existing Collateral
These examples request 1,000 USDC net from a supported market with USDC as its loan token (6 decimals). The position must already have enough collateral to support the total debt, including the fee. Product and asset IDs below are application configuration, not example IDs to copy.Add Collateral and Borrow Together
Use the same endpoint with both collateral fields. Read collateral decimals independently from loan-token decimals. The amount to add must come from the user’s selection and must support the requested debt. The cURL example requests 1,000 USDC net (6 decimals); replace the collateral amount with the user’s chosen amount in collateral-token atomic units.earn() and attribution from Call the API and execute() from Execute Calls in a Wallet.
Response Fields
The response includes the wallet batch and the following fee fields. Amount fields use the loan token’s atomic units. The gross amount is the new borrowing from this action, not the wallet’s total outstanding debt.
Pass only the wallet envelope fields to the wallet, not the fee-display fields. Preserve every returned call, its order and the attribution suffix. A wallet that cannot execute this batch atomically cannot use this borrowing flow; there is no sequential transaction fallback.