How to quote for a new loan
Overview
Before implementing loan features in your application, you'll need to retrieve essential loan information such as interest rates, minimum collateral requirements, and other terms. This guide explains how to fetch this data using our Protocol Data API endpoints.
Two Integration Approaches
A) Protocol-Specific Approach (Explicit)
Use this when you want to work with a specific lending protocol.
Get Available Protocols First, retrieve the list of all supported protocols:
Query Protocol Details Then, fetch specific protocol information using:
Required Parameters:
ParameterDescriptionExampleaction
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 includes:
Current interest rate
Liquidation price
Loan-to-Value (LTV) ratio
Example Response:
B) Protocol-Agnostic Approach (Less Explicit)
Let our system automatically select the optimal protocol for your needs.
Use the Generic Endpoint
Use the same parameters as above, excluding
protocol
.Our system will analyze your requirements and return the best protocol option based on:
Lowest interest rates
Best LTV ratios
Current market conditions
Protocol reliability
UI Integration Example
Next Steps
After retrieving protocol information, you can proceed to:
Last updated