How to execute a new loan
Last updated
Last updated
In this section, you'll learn how to request ready-to-use transaction data (bytecode) for a new loan.
As in the section, you can choose either the explicit path or the protocol-agnostic (less explicit) path to get the transaction data.
Use this when you want to work with a specific lending protocol.
Request Transaction Data Fetch specific protocol information using:
Required Parameters:
action
Type of operation
borrow
chainId
Blockchain network ID
137
(Polygon)
protocol
Protocol name
aave
amount
Borrow amount
10000000
(with decimals)
asset
Asset to borrow
USDC
collateralAsset
Collateral asset
ETH
collateralAmount
Amount of collateral
900000000000000000000000
(0.009 ETH with decimals)
Example Request:
Response:
Our API returns the transaction data as an array of objects. Each object contains to
, value
, and data
fields.
Let our system automatically select the optimal protocol for your needs.
Use the Generic Endpoint
Use the same parameters as the explicit approach above, excluding protocol
.
Example Request:
The response format will be identical to the explicit approach.
Execute the Transaction You'll need to sign and propagate the transaction data to the blockchain. This happens on your end - we don't touch your funds, custody remains yours.
After executing the loan, you can: